Re: OGNL performance detrimental to Struts 2

2006-12-17 Thread Don Brown

I wrote a simple Struts 2 TemplateEngine that renders tags in pure
Java, as opposed to the Freemarker that is used currently.  I'm seeing
performance improvements between 3 and 4 times faster than the old
tags.  This engine is based on the design I layed out previously [1].
It is better suited to simple tag rendering where the Freemarker
version is better suited for HTML-heavy tag output and customization.

The Java engine:
- Allows the tag generator and "interceptors" to deal with tag
objects, not pure text
- Tag "interceptors" or handlers have full control over the output
- Serialization of tag objects into text can be customized
- Is fast - 3 to 4 times faster than the Freemarker engine

Anyways, if nothing else, it shows there are things we can do to
drastically speed up the tags w/o throwing out OGNL.  If you only use
the simple theme, this might be an attractive option that gives you
more customization and speed.

I'm kinda up in the air as to where to put this.  I'm leaning toward
committing it to the sandbox as then it would be clear it is
experimental, especially since not all tags and themes are
implemented.

Don

[1] - http://www.mail-archive.com/dev@struts.apache.org/msg25065.html

On 12/13/06, Don Brown <[EMAIL PROTECTED]> wrote:

Very interesting... I wonder how much of the performance hit was due to
Freemarker and how much OGNL.  Could you package this application in a
war and attach it to a JIRA ticket?  I'd love to have it for future
comparisons.

Don

dice wrote:
> They are my stats Ted. The stats are posted below along with my sample JSP
> code. I only tried the textfield tag but looking at the ftl and vm files for
> the other tags I can't see how the results would be any different.
>
> Perhaps an interim solution could be to remove the use of OGNL from core
> functionality that doesn't require it. eg. Is it really necessary to access
> UIBean attributes from the theme templates using OGNL?
>
> PS: I emulated the Struts 2 themes in Struts 1 by wrapping Struts 1 tags in
> JSP Tag files and performance was still impressive.
>
>
> 
>
> Technology - Hits per second with 1 user / 10 users:
>
> Struts 1 - 109 / 191
> Stripes - 88 / 140
> WW2/SAF2 with default FreeMarker templates - 12 / 7
> WW2/SAF2 with Velocity templates - 22 / 15
> JSF - 27 / 40
>
>
> Sample JSP:
>
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
>
>
>
> Ted Husted-3 wrote:
>
>> On 12/13/06, Ian Roughley <[EMAIL PROTECTED]> wrote:
>>
>>> Do you have the performance numbers that you can share?  I'd really be
>>> interested in them.
>>>
>> There are some interesting numbers here
>>
>> *
>> 
http://javajmc.blogspot.com/2006/10/webwork-and-stripes-simple-performance.html
>>
>> (be sure to read to the *end* of the commnets).
>>
>> We might want to come up with a set of test pages that thorougly
>> exercise the core tags, so that we can run our own direct comparisons
>> of S1, S2, et al.
>>
>> Of course, the peformance is the still same as WebWork 2, which is
>> driving some serious applications. We also know exactly where lies the
>> bottleneck. We need to fix or replace OGNL.
>>
>> -Ted.
>>
>>
>>
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Top-level site published w/ site plugin snapshot

2006-12-17 Thread Wendy Smoak

I just published the top-level site using maven-site-plugin
2.0-SNAPSHOT.  It looks fine locally, but I didn't check every page.

I did not change the version in pom.xml, so if anything looks odd,
just 'mvn site-deploy' from a clean checkout and it will go back to
the way it was.  (And let me know...)

--
Wendy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]