You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Sayre <ri...@gmail.com> on 2008/05/30 14:16:11 UTC

Struts 2 Performance

Hi,

I have a few questions regarding performance in Struts 2.

First of all we are using 2.0.9.  I am trying to get the source to fix
the following memory leaks :
https://issues.apache.org/struts/browse/WW-2167 but I can't find the
2.0.9 build.  Can anyone point me to the source for that build?

We have several Struts 2 applications hosted on a Tomcat server.  We
have a copy of our Struts libraries in each of the applications
WEB-INF folder.  Is there a better way to have this set up to save
memory?  I know this is more of a tomcat question but I figured some
one here might have some suggestions.

Also, when I run Firebug to check the loading time of my page it seems
that alot of time is spent downloading Dojo scripts.  I am only using
the Ajax and the Tabbed Panel provided by dojo, nothing else.  Is
there a way to configure dojo to only use what is nessessary?  I did
see a post on this list a while ago that involved extracting the files
and rewriting the dojo require file,  is this still the best way to
increase dojo performance?

I was also getting a "script is busy - cancel or continue" in IE and
Firefox.  This was on a page that has a alot of HTML divs.  I finally
narrowed it down to some dojo that was running that seemed to be
looping through every element on the page after it loaded.  Does
anyone have any insight into this behavior?  Why is it needed?

Does the latest version 2.0.11.1 use a different version of dojo?
Does it perform better?  Would there be alot of code changes to change
from 0.4 to the version that the current build uses?

Thank you,

Rich

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 Performance

Posted by Richard Sayre <ri...@gmail.com>.
Thanks,  I have read that page before and I have done eveything except
move the static content to a seprate server.  Most of my application
slownesss comes from Dojo, loading script files that i dont use etc.
On the server side the memory leaks are causing permgen.  So those are
the pressing issues I have to fix.


On Fri, May 30, 2008 at 9:51 AM, Owen Berry <ow...@gmail.com> wrote:
> This should help:
>
> http://struts.apache.org/2.x/docs/performance-tuning.html
>
> On Fri, May 30, 2008 at 8:16 AM, Richard Sayre <ri...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I have a few questions regarding performance in Struts 2.
>>
>> First of all we are using 2.0.9.  I am trying to get the source to fix
>> the following memory leaks :
>> https://issues.apache.org/struts/browse/WW-2167 but I can't find the
>> 2.0.9 build.  Can anyone point me to the source for that build?
>>
>> We have several Struts 2 applications hosted on a Tomcat server.  We
>> have a copy of our Struts libraries in each of the applications
>> WEB-INF folder.  Is there a better way to have this set up to save
>> memory?  I know this is more of a tomcat question but I figured some
>> one here might have some suggestions.
>>
>> Also, when I run Firebug to check the loading time of my page it seems
>> that alot of time is spent downloading Dojo scripts.  I am only using
>> the Ajax and the Tabbed Panel provided by dojo, nothing else.  Is
>> there a way to configure dojo to only use what is nessessary?  I did
>> see a post on this list a while ago that involved extracting the files
>> and rewriting the dojo require file,  is this still the best way to
>> increase dojo performance?
>>
>> I was also getting a "script is busy - cancel or continue" in IE and
>> Firefox.  This was on a page that has a alot of HTML divs.  I finally
>> narrowed it down to some dojo that was running that seemed to be
>> looping through every element on the page after it loaded.  Does
>> anyone have any insight into this behavior?  Why is it needed?
>>
>> Does the latest version 2.0.11.1 use a different version of dojo?
>> Does it perform better?  Would there be alot of code changes to change
>> from 0.4 to the version that the current build uses?
>>
>> Thank you,
>>
>> Rich
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 Performance

Posted by Owen Berry <ow...@gmail.com>.
This should help:

http://struts.apache.org/2.x/docs/performance-tuning.html

On Fri, May 30, 2008 at 8:16 AM, Richard Sayre <ri...@gmail.com>
wrote:

> Hi,
>
> I have a few questions regarding performance in Struts 2.
>
> First of all we are using 2.0.9.  I am trying to get the source to fix
> the following memory leaks :
> https://issues.apache.org/struts/browse/WW-2167 but I can't find the
> 2.0.9 build.  Can anyone point me to the source for that build?
>
> We have several Struts 2 applications hosted on a Tomcat server.  We
> have a copy of our Struts libraries in each of the applications
> WEB-INF folder.  Is there a better way to have this set up to save
> memory?  I know this is more of a tomcat question but I figured some
> one here might have some suggestions.
>
> Also, when I run Firebug to check the loading time of my page it seems
> that alot of time is spent downloading Dojo scripts.  I am only using
> the Ajax and the Tabbed Panel provided by dojo, nothing else.  Is
> there a way to configure dojo to only use what is nessessary?  I did
> see a post on this list a while ago that involved extracting the files
> and rewriting the dojo require file,  is this still the best way to
> increase dojo performance?
>
> I was also getting a "script is busy - cancel or continue" in IE and
> Firefox.  This was on a page that has a alot of HTML divs.  I finally
> narrowed it down to some dojo that was running that seemed to be
> looping through every element on the page after it loaded.  Does
> anyone have any insight into this behavior?  Why is it needed?
>
> Does the latest version 2.0.11.1 use a different version of dojo?
> Does it perform better?  Would there be alot of code changes to change
> from 0.4 to the version that the current build uses?
>
> Thank you,
>
> Rich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Struts 2 Performance

Posted by Richard Sayre <ri...@gmail.com>.
Thank you, on my dev box I currently have instances set up,  but out
production uses one tomcat insall with eveything in the webapps dir.
If we were to use tomcat instances and share the libraries how would
this effect memory?  Its my understanding that using instances gives
each tomcat instance it own jvm?  is this correct?  I wil have to run
this by our server guy to see if he up for getting this running.  I
want to make sure I know the benifits first.  So I will do all of the
research but very generally how does instancing effect
server/application performance?

Thanks,

Rich

On Fri, May 30, 2008 at 8:59 AM, Giovanni Azua <gi...@imc.nl> wrote:
> hi,
>
> Richard Sayre wrote:
>>
>> We have several Struts 2 applications hosted on a Tomcat server.  We
>> have a copy of our Struts libraries in each of the applications
>> WEB-INF folder.  Is there a better way to have this set up to save
>> memory?  I know this is more of a tomcat question but I figured some
>> one here might have some suggestions.
>>
>
> I think I can help here ... Assuming you are using Tomcat 6.0.16 at least I
> think the following should work:
>
> - Install tomcat under a reusable directory like e.g.
> /opt/noarch/tomcat/6.0.16/ this will be your CATALINA_HOME and will include
> the folders: "bin" and "lib". Under lib you could place the reusable struts
> binaries shared across web server deployments i.e.
> export CATALINA_HOME=/opt/noarch/tomcat/6.0.16
>
> - Move everything else under a separate unix user all remaining tomcat
> folders e.g. "conf" "webapps" etc these are gonna be defined per tomcat
> instance and therefore will have a different server.xml using e.g. a
> different port within the same machine. This user say tomcat_instance_1 will
> be your CATALINA_BASE for that instance i.e.
> export CATALINA_BASE=/home/tomcat_instance_1
>       This way you can run several tomcat instances within the same machine
> and they would share the same tomcat binaries and the same Struts version.
>
> HTH.
> regards,
> Giovanni
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 Performance

Posted by Giovanni Azua <gi...@imc.nl>.
hi,

Richard Sayre wrote:
> We have several Struts 2 applications hosted on a Tomcat server.  We
> have a copy of our Struts libraries in each of the applications
> WEB-INF folder.  Is there a better way to have this set up to save
> memory?  I know this is more of a tomcat question but I figured some
> one here might have some suggestions.
>   
I think I can help here ... Assuming you are using Tomcat 6.0.16 at 
least I think the following should work:

- Install tomcat under a reusable directory like e.g. 
/opt/noarch/tomcat/6.0.16/ this will be your CATALINA_HOME and will 
include the folders: "bin" and "lib". Under lib you could place the 
reusable struts binaries shared across web server deployments i.e.
export CATALINA_HOME=/opt/noarch/tomcat/6.0.16

- Move everything else under a separate unix user all remaining tomcat 
folders e.g. "conf" "webapps" etc these are gonna be defined per tomcat 
instance and therefore will have a different server.xml using e.g. a 
different port within the same machine. This user say tomcat_instance_1 
will be your CATALINA_BASE for that instance i.e.
export CATALINA_BASE=/home/tomcat_instance_1
        
This way you can run several tomcat instances within the same machine 
and they would share the same tomcat binaries and the same Struts version.

HTH.
regards,
Giovanni

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 Performance

Posted by Dave Newton <ne...@yahoo.com>.
Oh; that might be S2.1--sorry!

Dave


--- On Mon, 6/9/08, Richard Sayre <ri...@gmail.com> wrote:

> From: Richard Sayre <ri...@gmail.com>
> Subject: Re: Struts 2 Performance
> To: "Struts Users Mailing List" <us...@struts.apache.org>, newton.dave@yahoo.com
> Date: Monday, June 9, 2008, 12:09 PM
> After some searching I found:
> 
> http://lazutkin.com/blog/2007/feb/1/improving-performance/
> 
> Under ' Optimizing widget initialization' there is
> an explantion on
> what to set (parseWidgets) and how to create them in code.
> 
> I realized I am using version 2.0.8 and me IDE says that
> parseContent
> is not a valid attribute for the s:head.
> 
> What release was that attribure introduced?
> 
> Thank you,
> 
> Rich
> 
> 
> 
> On Mon, Jun 9, 2008 at 11:49 AM, Dave Newton
> <ne...@yahoo.com> wrote:
> > Doesn't <s:head...> have a parseContent
> attribute?
> >
> > Either way, you may just be able to replicate the
> <s:head...> generated code with your own.
> >
> > Dave
> >
> > --- On Mon, 6/9/08, Richard Sayre
> <ri...@gmail.com> wrote:
> >
> >> From: Richard Sayre <ri...@gmail.com>
> >> Subject: Re: Struts 2 Performance
> >> To: "Struts Users Mailing List"
> <us...@struts.apache.org>
> >> Date: Monday, June 9, 2008, 10:53 AM
> >> Thank you for the dojo info.  I did a custom build
> for dojo
> >> using
> >>
> http://cwiki.apache.org/confluence/display/S2WIKI/Creating+a+custom+Dojo+profile+for+Struts+2.0.x
> >> and it reduced alot of requests
> >>
> >> I would like to turn off the page scan that dojo
> does and
> >> add the
> >> bootstrap code for the widgits my self.  I'm
> not sure
> >> what to search
> >> for to find information on this.  Can you point me
> to any
> >> articles or
> >> documentation?
> >>
> >> Thank you,
> >>
> >> Rich
> >>
> >>
> >> On Fri, May 30, 2008 at 5:05 PM, Laurie Harper
> >> <la...@holoweb.net> wrote:
> >> > Richard Sayre wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> I have a few questions regarding
> performance in
> >> Struts 2.
> >> >>
> >> >> First of all we are using 2.0.9.  I am
> trying to
> >> get the source to fix
> >> >> the following memory leaks :
> >> >>
> https://issues.apache.org/struts/browse/WW-2167
> >> but I can't find the
> >> >> 2.0.9 build.  Can anyone point me to the
> source
> >> for that build?
> >> >
> >> >
> >>
> http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_9/
> >> >
> >> >> We have several Struts 2 applications
> hosted on a
> >> Tomcat server.  We
> >> >> have a copy of our Struts libraries in
> each of the
> >> applications
> >> >> WEB-INF folder.  Is there a better way to
> have
> >> this set up to save
> >> >> memory?  I know this is more of a tomcat
> question
> >> but I figured some
> >> >> one here might have some suggestions.
> >> >
> >> > As Giovanni said, you can put the struts jars
> (and
> >> dependencies) into a
> >> > shared lib folder. You don't need to
> introduce
> >> Tomcat instancing to do this,
> >> > though. I should also point out that this
> isn't a
> >> tested configuration, so
> >> > you will want to test thoroughly.
> >> >
> >> >> Also, when I run Firebug to check the
> loading time
> >> of my page it seems
> >> >> that alot of time is spent downloading
> Dojo
> >> scripts.  I am only using
> >> >> the Ajax and the Tabbed Panel provided by
> dojo,
> >> nothing else.  Is
> >> >> there a way to configure dojo to only use
> what is
> >> nessessary?  I did
> >> >> see a post on this list a while ago that
> involved
> >> extracting the files
> >> >> and rewriting the dojo require file,  is
> this
> >> still the best way to
> >> >> increase dojo performance?
> >> >
> >> > Yes; you can improve the Dojo
> multiple-http-requests
> >> issue by creating a
> >> > custom Dojo build, which will bundle
> everything you
> >> use into dojo.js. You
> >> > will then see only one request (for dojo.js)
> in place
> >> of the multiple
> >> > requests you have now. See the Dojo
> documentation for
> >> how to create a custom
> >> > profile/build, or see below.
> >> >
> >> >> I was also getting a "script is busy
> - cancel
> >> or continue" in IE and
> >> >> Firefox.  This was on a page that has a
> alot of
> >> HTML divs.  I finally
> >> >> narrowed it down to some dojo that was
> running
> >> that seemed to be
> >> >> looping through every element on the page
> after it
> >> loaded.  Does
> >> >> anyone have any insight into this
> behavior?  Why
> >> is it needed?
> >> >
> >> > By default, Dojo scans the entire page
> looking for
> >> widgets to instantiate
> >> > (i.e. looking for tags with a dojoType
> attribute). For
> >> pages with a lot of
> >> > markup, that can be quite costly. There's
> a Dojo
> >> configuration switch to
> >> > turn that off, but then you need to add code
> to
> >> bootstrap the widgets.
> >> >
> >> >> Does the latest version 2.0.11.1 use a
> different
> >> version of dojo?
> >> >> Does it perform better?  Would there be
> alot of
> >> code changes to change
> >> >> from 0.4 to the version that the current
> build
> >> uses?
> >> >
> >> > 2.0.11.1 doesn't offer much improvement,
> but 2.1.2
> >> (beta) does. 2.1.2 comes
> >> > with a custom Dojo build pre-baked and with
> widget
> >> scanning turned off (it
> >> > also handles the widget bootstrapping for
> you).
> >> It's certainly more work to
> >> > upgrade to 2.1.2 than 2.0.11.1 but, given
> your
> >> concerns, it is probably
> >> > worth it.
> >> >
> >> > L.
> >> >
> >> >
> >> >
> >>
> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail:
> >> user-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail:
> >> user-help@struts.apache.org
> >> >
> >> >
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail:
> >> user-help@struts.apache.org
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 Performance

Posted by Richard Sayre <ri...@gmail.com>.
After some searching I found:

http://lazutkin.com/blog/2007/feb/1/improving-performance/

Under ' Optimizing widget initialization' there is an explantion on
what to set (parseWidgets) and how to create them in code.

I realized I am using version 2.0.8 and me IDE says that parseContent
is not a valid attribute for the s:head.

What release was that attribure introduced?

Thank you,

Rich



On Mon, Jun 9, 2008 at 11:49 AM, Dave Newton <ne...@yahoo.com> wrote:
> Doesn't <s:head...> have a parseContent attribute?
>
> Either way, you may just be able to replicate the <s:head...> generated code with your own.
>
> Dave
>
> --- On Mon, 6/9/08, Richard Sayre <ri...@gmail.com> wrote:
>
>> From: Richard Sayre <ri...@gmail.com>
>> Subject: Re: Struts 2 Performance
>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>> Date: Monday, June 9, 2008, 10:53 AM
>> Thank you for the dojo info.  I did a custom build for dojo
>> using
>> http://cwiki.apache.org/confluence/display/S2WIKI/Creating+a+custom+Dojo+profile+for+Struts+2.0.x
>> and it reduced alot of requests
>>
>> I would like to turn off the page scan that dojo does and
>> add the
>> bootstrap code for the widgits my self.  I'm not sure
>> what to search
>> for to find information on this.  Can you point me to any
>> articles or
>> documentation?
>>
>> Thank you,
>>
>> Rich
>>
>>
>> On Fri, May 30, 2008 at 5:05 PM, Laurie Harper
>> <la...@holoweb.net> wrote:
>> > Richard Sayre wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have a few questions regarding performance in
>> Struts 2.
>> >>
>> >> First of all we are using 2.0.9.  I am trying to
>> get the source to fix
>> >> the following memory leaks :
>> >> https://issues.apache.org/struts/browse/WW-2167
>> but I can't find the
>> >> 2.0.9 build.  Can anyone point me to the source
>> for that build?
>> >
>> >
>> http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_9/
>> >
>> >> We have several Struts 2 applications hosted on a
>> Tomcat server.  We
>> >> have a copy of our Struts libraries in each of the
>> applications
>> >> WEB-INF folder.  Is there a better way to have
>> this set up to save
>> >> memory?  I know this is more of a tomcat question
>> but I figured some
>> >> one here might have some suggestions.
>> >
>> > As Giovanni said, you can put the struts jars (and
>> dependencies) into a
>> > shared lib folder. You don't need to introduce
>> Tomcat instancing to do this,
>> > though. I should also point out that this isn't a
>> tested configuration, so
>> > you will want to test thoroughly.
>> >
>> >> Also, when I run Firebug to check the loading time
>> of my page it seems
>> >> that alot of time is spent downloading Dojo
>> scripts.  I am only using
>> >> the Ajax and the Tabbed Panel provided by dojo,
>> nothing else.  Is
>> >> there a way to configure dojo to only use what is
>> nessessary?  I did
>> >> see a post on this list a while ago that involved
>> extracting the files
>> >> and rewriting the dojo require file,  is this
>> still the best way to
>> >> increase dojo performance?
>> >
>> > Yes; you can improve the Dojo multiple-http-requests
>> issue by creating a
>> > custom Dojo build, which will bundle everything you
>> use into dojo.js. You
>> > will then see only one request (for dojo.js) in place
>> of the multiple
>> > requests you have now. See the Dojo documentation for
>> how to create a custom
>> > profile/build, or see below.
>> >
>> >> I was also getting a "script is busy - cancel
>> or continue" in IE and
>> >> Firefox.  This was on a page that has a alot of
>> HTML divs.  I finally
>> >> narrowed it down to some dojo that was running
>> that seemed to be
>> >> looping through every element on the page after it
>> loaded.  Does
>> >> anyone have any insight into this behavior?  Why
>> is it needed?
>> >
>> > By default, Dojo scans the entire page looking for
>> widgets to instantiate
>> > (i.e. looking for tags with a dojoType attribute). For
>> pages with a lot of
>> > markup, that can be quite costly. There's a Dojo
>> configuration switch to
>> > turn that off, but then you need to add code to
>> bootstrap the widgets.
>> >
>> >> Does the latest version 2.0.11.1 use a different
>> version of dojo?
>> >> Does it perform better?  Would there be alot of
>> code changes to change
>> >> from 0.4 to the version that the current build
>> uses?
>> >
>> > 2.0.11.1 doesn't offer much improvement, but 2.1.2
>> (beta) does. 2.1.2 comes
>> > with a custom Dojo build pre-baked and with widget
>> scanning turned off (it
>> > also handles the widget bootstrapping for you).
>> It's certainly more work to
>> > upgrade to 2.1.2 than 2.0.11.1 but, given your
>> concerns, it is probably
>> > worth it.
>> >
>> > L.
>> >
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail:
>> user-help@struts.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail:
>> user-help@struts.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 Performance

Posted by Dave Newton <ne...@yahoo.com>.
Doesn't <s:head...> have a parseContent attribute?

Either way, you may just be able to replicate the <s:head...> generated code with your own.

Dave

--- On Mon, 6/9/08, Richard Sayre <ri...@gmail.com> wrote:

> From: Richard Sayre <ri...@gmail.com>
> Subject: Re: Struts 2 Performance
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Monday, June 9, 2008, 10:53 AM
> Thank you for the dojo info.  I did a custom build for dojo
> using
> http://cwiki.apache.org/confluence/display/S2WIKI/Creating+a+custom+Dojo+profile+for+Struts+2.0.x
> and it reduced alot of requests
> 
> I would like to turn off the page scan that dojo does and
> add the
> bootstrap code for the widgits my self.  I'm not sure
> what to search
> for to find information on this.  Can you point me to any
> articles or
> documentation?
> 
> Thank you,
> 
> Rich
> 
> 
> On Fri, May 30, 2008 at 5:05 PM, Laurie Harper
> <la...@holoweb.net> wrote:
> > Richard Sayre wrote:
> >>
> >> Hi,
> >>
> >> I have a few questions regarding performance in
> Struts 2.
> >>
> >> First of all we are using 2.0.9.  I am trying to
> get the source to fix
> >> the following memory leaks :
> >> https://issues.apache.org/struts/browse/WW-2167
> but I can't find the
> >> 2.0.9 build.  Can anyone point me to the source
> for that build?
> >
> >
> http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_9/
> >
> >> We have several Struts 2 applications hosted on a
> Tomcat server.  We
> >> have a copy of our Struts libraries in each of the
> applications
> >> WEB-INF folder.  Is there a better way to have
> this set up to save
> >> memory?  I know this is more of a tomcat question
> but I figured some
> >> one here might have some suggestions.
> >
> > As Giovanni said, you can put the struts jars (and
> dependencies) into a
> > shared lib folder. You don't need to introduce
> Tomcat instancing to do this,
> > though. I should also point out that this isn't a
> tested configuration, so
> > you will want to test thoroughly.
> >
> >> Also, when I run Firebug to check the loading time
> of my page it seems
> >> that alot of time is spent downloading Dojo
> scripts.  I am only using
> >> the Ajax and the Tabbed Panel provided by dojo,
> nothing else.  Is
> >> there a way to configure dojo to only use what is
> nessessary?  I did
> >> see a post on this list a while ago that involved
> extracting the files
> >> and rewriting the dojo require file,  is this
> still the best way to
> >> increase dojo performance?
> >
> > Yes; you can improve the Dojo multiple-http-requests
> issue by creating a
> > custom Dojo build, which will bundle everything you
> use into dojo.js. You
> > will then see only one request (for dojo.js) in place
> of the multiple
> > requests you have now. See the Dojo documentation for
> how to create a custom
> > profile/build, or see below.
> >
> >> I was also getting a "script is busy - cancel
> or continue" in IE and
> >> Firefox.  This was on a page that has a alot of
> HTML divs.  I finally
> >> narrowed it down to some dojo that was running
> that seemed to be
> >> looping through every element on the page after it
> loaded.  Does
> >> anyone have any insight into this behavior?  Why
> is it needed?
> >
> > By default, Dojo scans the entire page looking for
> widgets to instantiate
> > (i.e. looking for tags with a dojoType attribute). For
> pages with a lot of
> > markup, that can be quite costly. There's a Dojo
> configuration switch to
> > turn that off, but then you need to add code to
> bootstrap the widgets.
> >
> >> Does the latest version 2.0.11.1 use a different
> version of dojo?
> >> Does it perform better?  Would there be alot of
> code changes to change
> >> from 0.4 to the version that the current build
> uses?
> >
> > 2.0.11.1 doesn't offer much improvement, but 2.1.2
> (beta) does. 2.1.2 comes
> > with a custom Dojo build pre-baked and with widget
> scanning turned off (it
> > also handles the widget bootstrapping for you).
> It's certainly more work to
> > upgrade to 2.1.2 than 2.0.11.1 but, given your
> concerns, it is probably
> > worth it.
> >
> > L.
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 Performance

Posted by Richard Sayre <ri...@gmail.com>.
Thank you for the dojo info.  I did a custom build for dojo using
http://cwiki.apache.org/confluence/display/S2WIKI/Creating+a+custom+Dojo+profile+for+Struts+2.0.x
and it reduced alot of requests

I would like to turn off the page scan that dojo does and add the
bootstrap code for the widgits my self.  I'm not sure what to search
for to find information on this.  Can you point me to any articles or
documentation?

Thank you,

Rich


On Fri, May 30, 2008 at 5:05 PM, Laurie Harper <la...@holoweb.net> wrote:
> Richard Sayre wrote:
>>
>> Hi,
>>
>> I have a few questions regarding performance in Struts 2.
>>
>> First of all we are using 2.0.9.  I am trying to get the source to fix
>> the following memory leaks :
>> https://issues.apache.org/struts/browse/WW-2167 but I can't find the
>> 2.0.9 build.  Can anyone point me to the source for that build?
>
> http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_9/
>
>> We have several Struts 2 applications hosted on a Tomcat server.  We
>> have a copy of our Struts libraries in each of the applications
>> WEB-INF folder.  Is there a better way to have this set up to save
>> memory?  I know this is more of a tomcat question but I figured some
>> one here might have some suggestions.
>
> As Giovanni said, you can put the struts jars (and dependencies) into a
> shared lib folder. You don't need to introduce Tomcat instancing to do this,
> though. I should also point out that this isn't a tested configuration, so
> you will want to test thoroughly.
>
>> Also, when I run Firebug to check the loading time of my page it seems
>> that alot of time is spent downloading Dojo scripts.  I am only using
>> the Ajax and the Tabbed Panel provided by dojo, nothing else.  Is
>> there a way to configure dojo to only use what is nessessary?  I did
>> see a post on this list a while ago that involved extracting the files
>> and rewriting the dojo require file,  is this still the best way to
>> increase dojo performance?
>
> Yes; you can improve the Dojo multiple-http-requests issue by creating a
> custom Dojo build, which will bundle everything you use into dojo.js. You
> will then see only one request (for dojo.js) in place of the multiple
> requests you have now. See the Dojo documentation for how to create a custom
> profile/build, or see below.
>
>> I was also getting a "script is busy - cancel or continue" in IE and
>> Firefox.  This was on a page that has a alot of HTML divs.  I finally
>> narrowed it down to some dojo that was running that seemed to be
>> looping through every element on the page after it loaded.  Does
>> anyone have any insight into this behavior?  Why is it needed?
>
> By default, Dojo scans the entire page looking for widgets to instantiate
> (i.e. looking for tags with a dojoType attribute). For pages with a lot of
> markup, that can be quite costly. There's a Dojo configuration switch to
> turn that off, but then you need to add code to bootstrap the widgets.
>
>> Does the latest version 2.0.11.1 use a different version of dojo?
>> Does it perform better?  Would there be alot of code changes to change
>> from 0.4 to the version that the current build uses?
>
> 2.0.11.1 doesn't offer much improvement, but 2.1.2 (beta) does. 2.1.2 comes
> with a custom Dojo build pre-baked and with widget scanning turned off (it
> also handles the widget bootstrapping for you). It's certainly more work to
> upgrade to 2.1.2 than 2.0.11.1 but, given your concerns, it is probably
> worth it.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 Performance

Posted by Laurie Harper <la...@holoweb.net>.
Richard Sayre wrote:
> Hi,
> 
> I have a few questions regarding performance in Struts 2.
> 
> First of all we are using 2.0.9.  I am trying to get the source to fix
> the following memory leaks :
> https://issues.apache.org/struts/browse/WW-2167 but I can't find the
> 2.0.9 build.  Can anyone point me to the source for that build?

http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_9/

> We have several Struts 2 applications hosted on a Tomcat server.  We
> have a copy of our Struts libraries in each of the applications
> WEB-INF folder.  Is there a better way to have this set up to save
> memory?  I know this is more of a tomcat question but I figured some
> one here might have some suggestions.

As Giovanni said, you can put the struts jars (and dependencies) into a 
shared lib folder. You don't need to introduce Tomcat instancing to do 
this, though. I should also point out that this isn't a tested 
configuration, so you will want to test thoroughly.

> Also, when I run Firebug to check the loading time of my page it seems
> that alot of time is spent downloading Dojo scripts.  I am only using
> the Ajax and the Tabbed Panel provided by dojo, nothing else.  Is
> there a way to configure dojo to only use what is nessessary?  I did
> see a post on this list a while ago that involved extracting the files
> and rewriting the dojo require file,  is this still the best way to
> increase dojo performance?

Yes; you can improve the Dojo multiple-http-requests issue by creating a 
custom Dojo build, which will bundle everything you use into dojo.js. 
You will then see only one request (for dojo.js) in place of the 
multiple requests you have now. See the Dojo documentation for how to 
create a custom profile/build, or see below.

> I was also getting a "script is busy - cancel or continue" in IE and
> Firefox.  This was on a page that has a alot of HTML divs.  I finally
> narrowed it down to some dojo that was running that seemed to be
> looping through every element on the page after it loaded.  Does
> anyone have any insight into this behavior?  Why is it needed?

By default, Dojo scans the entire page looking for widgets to 
instantiate (i.e. looking for tags with a dojoType attribute). For pages 
with a lot of markup, that can be quite costly. There's a Dojo 
configuration switch to turn that off, but then you need to add code to 
bootstrap the widgets.

> Does the latest version 2.0.11.1 use a different version of dojo?
> Does it perform better?  Would there be alot of code changes to change
> from 0.4 to the version that the current build uses?

2.0.11.1 doesn't offer much improvement, but 2.1.2 (beta) does. 2.1.2 
comes with a custom Dojo build pre-baked and with widget scanning turned 
off (it also handles the widget bootstrapping for you). It's certainly 
more work to upgrade to 2.1.2 than 2.0.11.1 but, given your concerns, it 
is probably worth it.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org