You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Cliff Zhao <zh...@gmail.com> on 2006/06/23 17:17:26 UTC

Tapestry causes memory leaks in IE

I found that my Tapestry (4.0.2) application was causing memory leaks in IE.


I spent a lot of time trying to figure out why. I removed many parts from my
page so that the page contains only one form with one Select component. It
still leaks memory. I checked the Tapestry.js and saw it hooks up three
attributes on form: events, onsubmit, onreset. Then, I added
dojo.event.browser.addClobberNodeAttrs(form,["events", "onsubmit",
"onreset"]) in my page. The IE memory leak went away.

I will continue to check memory leaks with my application, if I find
anything related to Tapestry, I will post it here.

Since Tapestry 4.1 is using dojo. Can I assume that this kind of memory leak
will not happen in 4.1? Or, are all Tapestry 4.1 event handlers based on
dojo? When will Tap 4.1 be released? How confident the Tap committers feel
about Tap 4.1?

Thanks.

Best Regards,
Cliff Zhao

Re: Porting Existing Site To Tapestry

Posted by "hv @ Fashion Content" <in...@fashioncontent.com>.
> Thanks for the exception code, that's most helpful. Where did you get it? 
> I'd like to be able to just look this type of thing up rather then bugging 
> everyone on the list about it.

There is a nice HiveDoc on the site under Framework -> Reports 
http://tapestry.apache.org/tapestry4/tapestry/hivedocs/index.html

To my knowledge there are very few how to examples though, so bugging the 
list is not such a bad idea if you can't figure out quite how to make the 
<contribution>.

Henrik 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Porting Existing Site To Tapestry

Posted by Michael Grundvig <mi...@electrotank.com>.
Thanks for the exception code, that's most helpful. Where did you get it? 
I'd like to be able to just look this type of thing up rather then bugging 
everyone on the list about it.

As for the site, they do want to make it more dynamic. It seems the easiest 
approach is to bite the bullet and get it all ported over in one shot. 
Additionally, site maintenence is much simpler with Tapestry, we can use 
components to manage navigation, basic layout, etc. rather then having 1000 
navbars :)

Mike

----- Original Message ----- 
From: "Kevin Menard" <km...@servprise.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Friday, June 23, 2006 11:34 AM
Subject: Re: Porting Existing Site To Tapestry


On Fri, 23 Jun 2006 12:27:21 -0400, Michael Grundvig
<mi...@electrotank.com> wrote:

> 1) How do I capture a Tapestry error that was caused by a missing page  (a 
> 404). With friendly URLs enabled I get the nice Tapestry error page  when 
> someone uses an invalid page. I need this to go to the custom 404  page 
> for the site.

You're going to want to make something like the following contributions to
HiveMind:

<contribution configuration-id="tapestry.InfrastructureOverrides">
   <property name="exceptionPresenter"
object="service:exceptionPresenter"/>
   </contribution>

<!-- Custom exception page. -->
   <service-point id="exceptionPresenter"
interface="org.apache.tapestry.error.ExceptionPresenter">
   <invoke-factory service-id="hivemind.BuilderFactory" model="singleton">
<construct class="com.servprise.www.services.ExceptionHandler">
<set-object property="exceptionPageName"
value="infrastructure:exceptionPageName"/>
<set-object property="requestExceptionReporter"
value="infrastructure:requestExceptionReporter"/>
<set-object property="responseRenderer"
value="infrastructure:responseRenderer"/>
<set-object property="debug" value="app-property:debug"/>
<set-object property="emailService" value="service:emailService"/>
</construct>
</invoke-factory>
   </service-point>

Replacing the service with your own class that implements
org.apache.tapestry.error.ExceptionPresenter.


> 2) Has anyone tried to port this large of a static site into Tapestry 
> directly?
>
> 3) Anyone used a war this large before? It's my biggest by far.

Out of curiosity, why are you converting a statice site to Tapestry?  It
seems counter-intuitive to me, unless your plan is to gradually make it
more dynamic.

-- 
Kevin



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Porting Existing Site To Tapestry

Posted by Kevin Menard <km...@servprise.com>.
On Fri, 23 Jun 2006 12:27:21 -0400, Michael Grundvig  
<mi...@electrotank.com> wrote:

> 1) How do I capture a Tapestry error that was caused by a missing page  
> (a 404). With friendly URLs enabled I get the nice Tapestry error page  
> when someone uses an invalid page. I need this to go to the custom 404  
> page for the site.

You're going to want to make something like the following contributions to  
HiveMind:

<contribution configuration-id="tapestry.InfrastructureOverrides">
   	<property name="exceptionPresenter"  
object="service:exceptionPresenter"/>
   </contribution>

<!-- Custom exception page. -->
   <service-point id="exceptionPresenter"  
interface="org.apache.tapestry.error.ExceptionPresenter">
   	<invoke-factory service-id="hivemind.BuilderFactory" model="singleton">
		<construct class="com.servprise.www.services.ExceptionHandler">
			<set-object property="exceptionPageName"  
value="infrastructure:exceptionPageName"/>
			<set-object property="requestExceptionReporter"  
value="infrastructure:requestExceptionReporter"/>
			<set-object property="responseRenderer"  
value="infrastructure:responseRenderer"/>
			<set-object property="debug" value="app-property:debug"/>
			<set-object property="emailService" value="service:emailService"/>
		</construct>
	</invoke-factory>
   </service-point>

Replacing the service with your own class that implements  
org.apache.tapestry.error.ExceptionPresenter.


> 2) Has anyone tried to port this large of a static site into Tapestry  
> directly?
>
> 3) Anyone used a war this large before? It's my biggest by far.

Out of curiosity, why are you converting a statice site to Tapestry?  It  
seems counter-intuitive to me, unless your plan is to gradually make it  
more dynamic.

-- 
Kevin



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Porting Existing Site To Tapestry

Posted by Michael Grundvig <mi...@electrotank.com>.
Hi all; I'm a recent convert to Tapestry and love it thus far! I am about to 
migrate a huge static site into Tapestry. The site is 
http://www.unityonline.org and runs more then 1000 pages and tons of images. 
When packaged down into a war using Maven2, it comes out at 250 megs. 
Because the existing site is static and I want the migration to be painless, 
I'm using friendly URLs. Additionally, I've created a servlet filter that 
maps all directory requests to an index page (ie. http://site.com/stuff 
becomes http://site.com/stuff/index.html). This seems to work great and 
allows Tapestry to handle directory-only requests. With these two things it 
looks like any static site can be ported directly into Tapestry without any 
modifications. Now for the questions:

1) How do I capture a Tapestry error that was caused by a missing page (a 
404). With friendly URLs enabled I get the nice Tapestry error page when 
someone uses an invalid page. I need this to go to the custom 404 page for 
the site.

2) Has anyone tried to port this large of a static site into Tapestry 
directly?

3) Anyone used a war this large before? It's my biggest by far.

Thanks!

Mike 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry causes memory leaks in IE

Posted by Cliff Zhao <zh...@gmail.com>.
Great!!!

Thank you very much.


On 6/23/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> I've been writing a new demo for 4.1. The only people that may have issues
> in the upgrade are those using Tacos. Everyone else shouldn't have to do
> much of anything else. I've gone through great pains to ensure it is very
> backwards compatible.
>
> There is no guarantee of course, but hopefully the upgrade process will be
> transparent, allowing you to "opt in" for using the new features when you
> choose.
>
> On 6/23/06, Cliff Zhao <zh...@gmail.com> wrote:
> >
> > Thank you very much.
> >
> > Do you have any write-ups on the incompatibilities between 4.0.2 and 4.1
> ?
> > I
> > like to have an idea how much effort I should expect for upgrading my
> Tap
> > 4.0.2 application to Tap 4.1.
> >
> > I think that you may have already upgraded the Tap demos to 4.1. Could
> you
> > share how easy or difficult to upgrade them to Tap 4.1?
> >
> > Thanks.
> >
> > Best Regards,
> > Cliff Zhao
> >
> > On 6/23/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > >
> > > 4.1 definitely uses dojo for any connection of events to ~anything~ in
> > > general in JS. I am very confident in the stability of the 4.1 js...In
> > > part
> > > because I have javascript based unit tests that confirm its
> > functionality,
> > > in part because I'm using dojo for everything and probably some
> > cockyness
> > > mixed in there somewhere. ..=p
> > >
> > > 4.1 has already been released,
> > > http://tapestry.apache.org/tapestry4.1/download.html .
> > >
> > > It's only snapshot builds for now, maybe a more complete release in
> the
> > > next
> > > couple of weeks. I'll keep the snapshots up to date with changes
> > > until/after
> > > then though.
> > >
> > > On 6/23/06, Cliff Zhao <zh...@gmail.com> wrote:
> > > >
> > > > I found that my Tapestry (4.0.2) application was causing memory
> leaks
> > in
> > > > IE.
> > > >
> > > >
> > > > I spent a lot of time trying to figure out why. I removed many parts
> > > from
> > > > my
> > > > page so that the page contains only one form with one Select
> > component.
> > > It
> > > > still leaks memory. I checked the Tapestry.js and saw it hooks up
> > three
> > > > attributes on form: events, onsubmit, onreset. Then, I added
> > > > dojo.event.browser.addClobberNodeAttrs(form,["events", "onsubmit",
> > > > "onreset"]) in my page. The IE memory leak went away.
> > > >
> > > > I will continue to check memory leaks with my application, if I find
> > > > anything related to Tapestry, I will post it here.
> > > >
> > > > Since Tapestry 4.1 is using dojo. Can I assume that this kind of
> > memory
> > > > leak
> > > > will not happen in 4.1? Or, are all Tapestry 4.1 event handlers
> based
> > on
> > > > dojo? When will Tap 4.1 be released? How confident the Tap
> committers
> > > feel
> > > > about Tap 4.1?
> > > >
> > > > Thanks.
> > > >
> > > > Best Regards,
> > > > Cliff Zhao
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tacos/Tapestry, team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind.
> > >
> > >
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>

Re: Tapestry causes memory leaks in IE

Posted by Jesse Kuhnert <jk...@gmail.com>.
I've been writing a new demo for 4.1. The only people that may have issues
in the upgrade are those using Tacos. Everyone else shouldn't have to do
much of anything else. I've gone through great pains to ensure it is very
backwards compatible.

There is no guarantee of course, but hopefully the upgrade process will be
transparent, allowing you to "opt in" for using the new features when you
choose.

On 6/23/06, Cliff Zhao <zh...@gmail.com> wrote:
>
> Thank you very much.
>
> Do you have any write-ups on the incompatibilities between 4.0.2 and 4.1?
> I
> like to have an idea how much effort I should expect for upgrading my Tap
> 4.0.2 application to Tap 4.1.
>
> I think that you may have already upgraded the Tap demos to 4.1. Could you
> share how easy or difficult to upgrade them to Tap 4.1?
>
> Thanks.
>
> Best Regards,
> Cliff Zhao
>
> On 6/23/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> >
> > 4.1 definitely uses dojo for any connection of events to ~anything~ in
> > general in JS. I am very confident in the stability of the 4.1 js...In
> > part
> > because I have javascript based unit tests that confirm its
> functionality,
> > in part because I'm using dojo for everything and probably some
> cockyness
> > mixed in there somewhere. ..=p
> >
> > 4.1 has already been released,
> > http://tapestry.apache.org/tapestry4.1/download.html .
> >
> > It's only snapshot builds for now, maybe a more complete release in the
> > next
> > couple of weeks. I'll keep the snapshots up to date with changes
> > until/after
> > then though.
> >
> > On 6/23/06, Cliff Zhao <zh...@gmail.com> wrote:
> > >
> > > I found that my Tapestry (4.0.2) application was causing memory leaks
> in
> > > IE.
> > >
> > >
> > > I spent a lot of time trying to figure out why. I removed many parts
> > from
> > > my
> > > page so that the page contains only one form with one Select
> component.
> > It
> > > still leaks memory. I checked the Tapestry.js and saw it hooks up
> three
> > > attributes on form: events, onsubmit, onreset. Then, I added
> > > dojo.event.browser.addClobberNodeAttrs(form,["events", "onsubmit",
> > > "onreset"]) in my page. The IE memory leak went away.
> > >
> > > I will continue to check memory leaks with my application, if I find
> > > anything related to Tapestry, I will post it here.
> > >
> > > Since Tapestry 4.1 is using dojo. Can I assume that this kind of
> memory
> > > leak
> > > will not happen in 4.1? Or, are all Tapestry 4.1 event handlers based
> on
> > > dojo? When will Tap 4.1 be released? How confident the Tap committers
> > feel
> > > about Tap 4.1?
> > >
> > > Thanks.
> > >
> > > Best Regards,
> > > Cliff Zhao
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> >
> >
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: Tapestry causes memory leaks in IE

Posted by Cliff Zhao <zh...@gmail.com>.
Thank you very much.

Do you have any write-ups on the incompatibilities between 4.0.2 and 4.1? I
like to have an idea how much effort I should expect for upgrading my Tap
4.0.2 application to Tap 4.1.

I think that you may have already upgraded the Tap demos to 4.1. Could you
share how easy or difficult to upgrade them to Tap 4.1?

Thanks.

Best Regards,
Cliff Zhao

On 6/23/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> 4.1 definitely uses dojo for any connection of events to ~anything~ in
> general in JS. I am very confident in the stability of the 4.1 js...In
> part
> because I have javascript based unit tests that confirm its functionality,
> in part because I'm using dojo for everything and probably some cockyness
> mixed in there somewhere. ..=p
>
> 4.1 has already been released,
> http://tapestry.apache.org/tapestry4.1/download.html .
>
> It's only snapshot builds for now, maybe a more complete release in the
> next
> couple of weeks. I'll keep the snapshots up to date with changes
> until/after
> then though.
>
> On 6/23/06, Cliff Zhao <zh...@gmail.com> wrote:
> >
> > I found that my Tapestry (4.0.2) application was causing memory leaks in
> > IE.
> >
> >
> > I spent a lot of time trying to figure out why. I removed many parts
> from
> > my
> > page so that the page contains only one form with one Select component.
> It
> > still leaks memory. I checked the Tapestry.js and saw it hooks up three
> > attributes on form: events, onsubmit, onreset. Then, I added
> > dojo.event.browser.addClobberNodeAttrs(form,["events", "onsubmit",
> > "onreset"]) in my page. The IE memory leak went away.
> >
> > I will continue to check memory leaks with my application, if I find
> > anything related to Tapestry, I will post it here.
> >
> > Since Tapestry 4.1 is using dojo. Can I assume that this kind of memory
> > leak
> > will not happen in 4.1? Or, are all Tapestry 4.1 event handlers based on
> > dojo? When will Tap 4.1 be released? How confident the Tap committers
> feel
> > about Tap 4.1?
> >
> > Thanks.
> >
> > Best Regards,
> > Cliff Zhao
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>

Re: Tapestry causes memory leaks in IE

Posted by Jesse Kuhnert <jk...@gmail.com>.
4.1 definitely uses dojo for any connection of events to ~anything~ in
general in JS. I am very confident in the stability of the 4.1 js...In part
because I have javascript based unit tests that confirm its functionality,
in part because I'm using dojo for everything and probably some cockyness
mixed in there somewhere. ..=p

4.1 has already been released,
http://tapestry.apache.org/tapestry4.1/download.html .

It's only snapshot builds for now, maybe a more complete release in the next
couple of weeks. I'll keep the snapshots up to date with changes until/after
then though.

On 6/23/06, Cliff Zhao <zh...@gmail.com> wrote:
>
> I found that my Tapestry (4.0.2) application was causing memory leaks in
> IE.
>
>
> I spent a lot of time trying to figure out why. I removed many parts from
> my
> page so that the page contains only one form with one Select component. It
> still leaks memory. I checked the Tapestry.js and saw it hooks up three
> attributes on form: events, onsubmit, onreset. Then, I added
> dojo.event.browser.addClobberNodeAttrs(form,["events", "onsubmit",
> "onreset"]) in my page. The IE memory leak went away.
>
> I will continue to check memory leaks with my application, if I find
> anything related to Tapestry, I will post it here.
>
> Since Tapestry 4.1 is using dojo. Can I assume that this kind of memory
> leak
> will not happen in 4.1? Or, are all Tapestry 4.1 event handlers based on
> dojo? When will Tap 4.1 be released? How confident the Tap committers feel
> about Tap 4.1?
>
> Thanks.
>
> Best Regards,
> Cliff Zhao
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.