You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pierre Thibaudeau <pi...@gmail.com> on 2009/01/06 19:09:39 UTC

Re: Performance issue

>From the comparison I made on my own system, S2 is overall about 30 to
60 times slower than S1.  This is based on comparing a number of pages
(repeatedly, testing with JMeter, etc.);  the pages being compared
are, admittedly not 100% identical, but abstracting from the specific
differences, the performance of S2 is still more than one order of
magnitude behind what I had come to expect from S1.

I don't think I would ever want to go back to S1, given S2's
advantages.  But now that we are nearing production, S2's performance
is giving me headaches!

2008/12/13 yorlick kilroy wrote:
> The bottleneck is OGNL.
> I replaced the struts2 tags with JSTL Core
> This made loading my jsps almost 20 times faster!!!
> I mainly did this replacing in jsps that produce lots of output. I
> still use struts2 tags in jsps where I process forms and other small
> jsps.

I am following your lead and reverting to <c:tags>, and even removing
them altogether when the tag merely produces an HTML element such as
<input>---I never use anything but the simple theme, as I rely
entirely on CSS and not on tables.

Two tags however seem very difficult to avoid:  <s:url> and <s:text>.

<s:text>
My application is entirely i18lized, so I rely heavily on those
resources. Since I use Spring, however, I am very tempted to use
Spring's resources feature and therefore Spring's tags to deal with
it;  I have no idea how fast they are, but it can't be worse than
S2s... (Unfortunately, Spring's resources are not customized to S2's
model-driven actions...) That would probably involve an unpleasant
amount of refactorization, but if it's worth it, I'll do it! Any
comment on this?

<s:url>
That's a tough one.  I may have to write my own OGNL-less version of
that tag...  Suggestions for a simpler alternative?

All in all, it seems to me that this performance issue could easily be
the death of S2 (which would be a real shame).  Two alternatives
present themselves:
* Making a version of S2 that doesn't necessarily rely on OGNL.
* Making OGNL ten times faster.

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


Re: Performance issue

Posted by st...@gmail.com.
This test sounds about as straightforward as parallel parking a freight
train on a one lane road.

RE: Performance issue

Posted by Andy <an...@hotmail.com>.
I would be interested in seeing new benchmark results if anyone happens to generate some.  Might want to avoid database-based tests due to caching.  
> Date: Tue, 6 Jan 2009 16:19:36 -0500> From: pierre.thibaudeau@gmail.com> To: user@struts.apache.org> Subject: Re: Performance issue> > Yes the model is *exactly* the same in the two cases. In fact, both> S1 and S2 exist concurrently in the same Tomcat application.> > Each test is run using JMeter, with 10 users who randomly try to> access one of 42 different pages involving 10 different types of> results (that is, roughly speaking, 10 different JSPs, abstracting> from the fact that each page is really composed of 6 or 7 different> JSP tiles). In total, roughly 1,600 pages were queried for each test.> Moreover, each test was performed after re-starting Tomcat, once the> pages had been warmed up.> > My last post in this thread was fairly extreme, and I felt the need to> make new tests that relied on fewer assumptions and more on hard> facts. So I modified the pages tested as best I could, in order to> make the respective S1 pages and S2 pages as close to identical as> possible. In particular, this meant beefing up my old S1 pages,> adding to them some of the more recent sections that existed only in> the S2 version: mostly (but not exclusively) a lot of javascrip/dojo> stuff, which is not interpreted anyway by JMeter. (I don't rely on S2> for dojo, but provide my own; and yes, I package and shrinksafe it).> > Since my original timing for S1 pages were so ridiculously low (often> under 10 ms!!!), the new beefed-up S1 pages were bound to be> significantly slower.> On average, with the beefed-up pages, S1 pages take 74 ms to load.> > Since last running the S2 tests (about 4 days ago), I did a fair> amount of optimizing and I replaced the most obvious <s:tags> by> <c:ones> in about half of the JSPs. I therefore re-ran the tests just> before writing this current post.> There is a marked improvement and, on average, S2 pages load in 169 ms.> > In other words, I may have been a little (!) hasty in posting my> previous statement! (*blushing*) My apologies to all the people who> care about S2!!!> We are happily very far from the apocalyptic 30x factor that I had> previously observed. (Some tests last week were showing averages of> 580 ms per S2-page!)> > As I am under pressure, I may not have time immediately to set up a> new test to compare the most recent result with the case of S2 pages> that entirely rely on <s:tags>, though that would be very> enlightening. If I can get round to it, I promise to post the> results!> > ---------------------------------------------------------------------> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org> For additional commands, e-mail: user-help@struts.apache.org> 
_________________________________________________________________
It’s the same Hotmail®. If by “same” you mean up to 70% faster.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad1_122008

Re : Performance issue

Posted by François Rouxel <ro...@yahoo.com>.
Are you using many interceptors?

 ____________________________________________ ____________________________________________



----- Message d'origine ----
De : Pierre Thibaudeau <pi...@gmail.com>
À : Struts Users Mailing List <us...@struts.apache.org>
Envoyé le : Mardi, 6 Janvier 2009, 16h19mn 36s
Objet : Re: Performance issue

Yes the model is *exactly* the same in the two cases.  In fact, both
S1 and S2 exist concurrently in the same Tomcat application.

Each test is run using JMeter, with 10 users who randomly try to
access one of 42 different pages involving 10 different types of
results (that is, roughly speaking, 10 different JSPs, abstracting
from the fact that each page is really composed of 6 or 7 different
JSP tiles).  In total, roughly 1,600 pages were queried for each test.
Moreover, each test was performed after re-starting Tomcat, once the
pages had been warmed up.

My last post in this thread was fairly extreme, and I felt the need to
make new tests that relied on fewer assumptions and more on hard
facts.  So I modified the pages tested as best I could, in order to
make the respective S1 pages and S2 pages as close to identical as
possible.  In particular, this meant beefing up my old S1 pages,
adding to them some of the more recent sections that existed only in
the S2 version:  mostly (but not exclusively) a lot of javascrip/dojo
stuff, which is not interpreted anyway by JMeter. (I don't rely on S2
for dojo, but provide my own; and yes, I package and shrinksafe it).

Since my original timing for S1 pages were so ridiculously low (often
under 10 ms!!!), the new beefed-up S1 pages were bound to be
significantly slower.
On average, with the beefed-up pages, S1 pages take 74 ms to load.

Since last running the S2 tests (about 4 days ago), I did a fair
amount of optimizing and I replaced the most obvious <s:tags> by
<c:ones> in about half of the JSPs. I therefore re-ran the tests just
before writing this current post.
There is a marked improvement and, on average, S2 pages load in 169 ms.

In other words, I may have been a little (!) hasty in posting my
previous statement! (*blushing*)  My apologies to all the people who
care about S2!!!
We are happily very far from the apocalyptic 30x factor that I had
previously observed.  (Some tests last week were showing averages of
580 ms per S2-page!)

As I am under pressure, I may not have time immediately to set up a
new test to compare the most recent result with the case of S2 pages
that entirely rely on <s:tags>, though that would be very
enlightening.  If I can get round to it, I promise to post the
results!

---------------------------------------------------------------------
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: Performance issue

Posted by Pierre Thibaudeau <pi...@gmail.com>.
Yes the model is *exactly* the same in the two cases.  In fact, both
S1 and S2 exist concurrently in the same Tomcat application.

Each test is run using JMeter, with 10 users who randomly try to
access one of 42 different pages involving 10 different types of
results (that is, roughly speaking, 10 different JSPs, abstracting
from the fact that each page is really composed of 6 or 7 different
JSP tiles).  In total, roughly 1,600 pages were queried for each test.
 Moreover, each test was performed after re-starting Tomcat, once the
pages had been warmed up.

My last post in this thread was fairly extreme, and I felt the need to
make new tests that relied on fewer assumptions and more on hard
facts.  So I modified the pages tested as best I could, in order to
make the respective S1 pages and S2 pages as close to identical as
possible.  In particular, this meant beefing up my old S1 pages,
adding to them some of the more recent sections that existed only in
the S2 version:  mostly (but not exclusively) a lot of javascrip/dojo
stuff, which is not interpreted anyway by JMeter. (I don't rely on S2
for dojo, but provide my own; and yes, I package and shrinksafe it).

Since my original timing for S1 pages were so ridiculously low (often
under 10 ms!!!), the new beefed-up S1 pages were bound to be
significantly slower.
On average, with the beefed-up pages, S1 pages take 74 ms to load.

Since last running the S2 tests (about 4 days ago), I did a fair
amount of optimizing and I replaced the most obvious <s:tags> by
<c:ones> in about half of the JSPs. I therefore re-ran the tests just
before writing this current post.
There is a marked improvement and, on average, S2 pages load in 169 ms.

In other words, I may have been a little (!) hasty in posting my
previous statement! (*blushing*)  My apologies to all the people who
care about S2!!!
We are happily very far from the apocalyptic 30x factor that I had
previously observed.  (Some tests last week were showing averages of
580 ms per S2-page!)

As I am under pressure, I may not have time immediately to set up a
new test to compare the most recent result with the case of S2 pages
that entirely rely on <s:tags>, though that would be very
enlightening.  If I can get round to it, I promise to post the
results!

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


Re: Performance issue

Posted by Musachy Barroso <mu...@gmail.com>.
60 times slower? I am expecting S2 to be slower that S1 but 60 times
sounds weird to me. The other thing that sounds weird is the huge
difference between 30 and 60 times.

musachy

On Tue, Jan 6, 2009 at 1:09 PM, Pierre Thibaudeau
<pi...@gmail.com> wrote:
> From the comparison I made on my own system, S2 is overall about 30 to
> 60 times slower than S1.  This is based on comparing a number of pages
> (repeatedly, testing with JMeter, etc.);  the pages being compared
> are, admittedly not 100% identical, but abstracting from the specific
> differences, the performance of S2 is still more than one order of
> magnitude behind what I had come to expect from S1.
>
> I don't think I would ever want to go back to S1, given S2's
> advantages.  But now that we are nearing production, S2's performance
> is giving me headaches!
>
> 2008/12/13 yorlick kilroy wrote:
>> The bottleneck is OGNL.
>> I replaced the struts2 tags with JSTL Core
>> This made loading my jsps almost 20 times faster!!!
>> I mainly did this replacing in jsps that produce lots of output. I
>> still use struts2 tags in jsps where I process forms and other small
>> jsps.
>
> I am following your lead and reverting to <c:tags>, and even removing
> them altogether when the tag merely produces an HTML element such as
> <input>---I never use anything but the simple theme, as I rely
> entirely on CSS and not on tables.
>
> Two tags however seem very difficult to avoid:  <s:url> and <s:text>.
>
> <s:text>
> My application is entirely i18lized, so I rely heavily on those
> resources. Since I use Spring, however, I am very tempted to use
> Spring's resources feature and therefore Spring's tags to deal with
> it;  I have no idea how fast they are, but it can't be worse than
> S2s... (Unfortunately, Spring's resources are not customized to S2's
> model-driven actions...) That would probably involve an unpleasant
> amount of refactorization, but if it's worth it, I'll do it! Any
> comment on this?
>
> <s:url>
> That's a tough one.  I may have to write my own OGNL-less version of
> that tag...  Suggestions for a simpler alternative?
>
> All in all, it seems to me that this performance issue could easily be
> the death of S2 (which would be a real shame).  Two alternatives
> present themselves:
> * Making a version of S2 that doesn't necessarily rely on OGNL.
> * Making OGNL ten times faster.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Re : Performance issue

Posted by François Rouxel <ro...@yahoo.com>.
Is is the same model behind the MVC?

fr/

 ____________________________________________ ____________________________________________



----- Message d'origine ----
De : Pierre Thibaudeau <pi...@gmail.com>
À : Struts Users Mailing List <us...@struts.apache.org>
Envoyé le : Mardi, 6 Janvier 2009, 13h09mn 39s
Objet : Re: Performance issue

From the comparison I made on my own system, S2 is overall about 30 to
60 times slower than S1.  This is based on comparing a number of pages
(repeatedly, testing with JMeter, etc.);  the pages being compared
are, admittedly not 100% identical, but abstracting from the specific
differences, the performance of S2 is still more than one order of
magnitude behind what I had come to expect from S1.

I don't think I would ever want to go back to S1, given S2's
advantages.  But now that we are nearing production, S2's performance
is giving me headaches!

2008/12/13 yorlick kilroy wrote:
> The bottleneck is OGNL.
> I replaced the struts2 tags with JSTL Core
> This made loading my jsps almost 20 times faster!!!
> I mainly did this replacing in jsps that produce lots of output. I
> still use struts2 tags in jsps where I process forms and other small
> jsps.

I am following your lead and reverting to <c:tags>, and even removing
them altogether when the tag merely produces an HTML element such as
<input>---I never use anything but the simple theme, as I rely
entirely on CSS and not on tables.

Two tags however seem very difficult to avoid:  <s:url> and <s:text>.

<s:text>
My application is entirely i18lized, so I rely heavily on those
resources. Since I use Spring, however, I am very tempted to use
Spring's resources feature and therefore Spring's tags to deal with
it;  I have no idea how fast they are, but it can't be worse than
S2s... (Unfortunately, Spring's resources are not customized to S2's
model-driven actions...) That would probably involve an unpleasant
amount of refactorization, but if it's worth it, I'll do it! Any
comment on this?

<s:url>
That's a tough one.  I may have to write my own OGNL-less version of
that tag...  Suggestions for a simpler alternative?

All in all, it seems to me that this performance issue could easily be
the death of S2 (which would be a real shame).  Two alternatives
present themselves:
* Making a version of S2 that doesn't necessarily rely on OGNL.
* Making OGNL ten times faster.

---------------------------------------------------------------------
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