Just downloaded JProfiler eval.

Compared tagfile performance between 7.0.21 and 7.0.trunk (this one this time 
: http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/)

With your optimization, we achieve a 24% performance gain - nice ;) 

Test         7.0.21    7.0.trunk
tagfile       267ms      206ms

You can see JConsole output
 * 7.0.21 : http://imageshack.us/photo/my-images/233/tagperftagfile7021.jpg/
 * 7.0.trunk 
: http://imageshack.us/photo/my-images/52/tagperftagfile70trunk.jpg/

Tests were made 
with http://localhost:8080/tagfilesperf/generated/edit-tagfile.jsp


One more question though : 
Do you think we can cache ValueExpression instances ?
Caching those instance, we could gain 14% more performance on this use case.
If we can cache them, what would be a good cache key ? 
(<expressionAsString><jspPageName> ?)

Also, need to update classictag performance suite, there's a problem in it.
I'l then do one more comparison test between classictag and tagfile.

Note : this is once more my home computer, but using JProfiler is a bit more 
accurate I think.

-- Details --
7.0.21 - tagfile 
Total time : [267 ms] in edit-tagfile.jsp 
Note : if not specified, units in microseconds
[860] 1 iteration 
- [565]doTag (cf input_tagx.java code)
- [450] PageContextImpl.proprietaryEvaluate
- [249] ValueExpressionImpl.getValue
- [122] ElExpressionFactoryImpl.createValueExpression [note 1]
- [236]DefaultInstanceManager.newInstance
- [203] DefaultInstanceManager.processAnnotations [note 2]

note 1 : 14% gain
Perhaps we can optimize here caching ValueExpressions instance (caching where 
since tagfiles are not pooled ?).
What would be the key of such a cache ? <expression+jsp.class ?>
note 2 : 23.6% gain : Mark optimization.
Cache annotation processing.

7.0.trunk - tagfile
Total time : [206 ms] edit-tagfile.jsp 
[687] 1 iteration 
- [586]doTag (cf input_tagx.java code)
- [470] PageContextImpl.proprietaryEvaluate
- [269] ValueExpressionImpl.getValue
- [127] ElExpressionFactoryImpl.createValueExpression [note 1]
- [44] DefaultInstanceManager.newInstance
- [10] DefaultInstanceManager.processAnnotations [note 2]


Thanks !!!

----- Mail original -----
De : Mark Thomas <ma...@apache.org>
À : Tomcat Users List <users@tomcat.apache.org>
Cc : 
Envoyé le : Mercredi 7 Septembre 2011 22h20
Objet : Re: Re : Re : Performance issue in simpleTags and tagfiles

On 07/09/2011 20:36, Adrian Gonzalez wrote:
> Sorry, no real difference.
> 
> Even worse, I'm on my home computer and here I don't see anymore the *5 
> difference between simple tags and classic tags.

The figures I saw were:
Test    OP      Me      Cached
tagfile 500     328     203
classic 100     141     156
simple  500     250     156
none    94      140     156

A slight increase in the case where the cache isn't used and a
reasonable improvement in the other cases.

Performance tuning is always going to be system dependent. In this case
I think there us enough evidence to justify putting in the cache - even
if this is effectively a micro benchmark.

> I'll continue these tests tomorrow at work (perhaps there's some file 
> scanning / reading in action - and since I'm with AV software...).

I'd be very interested to see those results.

>  - Tests results - 
> 
> Downloaded tomcat trunk sources from 
> http://svn.apache.org/repos/asf/tomcat/trunk/

That is actually 8.0.x but there is currently very little difference
between that an 7.0.x with is at:
http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/

Cheers,

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to