Remy Maucherat wrote:

>>>If tag-pooling works for you, I'm happy for you.  The current
>>>implementation
>>>doesn't work for me big time.  However, I'm very interested in Costin's
>>>claim that it can be done thread-local.
>> 
>> 
>> One quick question ( looking at generated code ) - why is the TP limited
>> to 5 instances ? If you expect 20+ concurent requests ( where the TP
>> would actually matter ) - you'll have the overhead of TP sync, and almost
>> no benefit. Can you try again with a larger capacity ?
>> 
>> Regarding the "claim" that it can be done thread-local: I attached a
>> first draft, I'll enhance it later ( it could use ThreadWithAttributes -
>> to save one extra hashtable lookup ). Let me know if it helps.
> 
> If we could add a check so that JDKs < 1.4 would use the old synced
> code, and JDK >= 1.4 would use TL, I think it would be the best.

ThreadLocal is JDK1.2+ AFAIK.
It's just that the implementation in 1.4 has been optimized ( or so I 
heard). But even 1.2 TL should be faster than the sync.

IMO the 5 limit has a bigger impact than the sync - I would bet Bill 
tested with >20 concurent requests. I would make the max much bigger
( 100 ? ) - if fewer tags are used in a page, then the max will never be
reached.


> BTW, wouldn't using ThreadWithAttributes tie Jasper to Tomcat ?

Well - with some conditionals and Class.forName() it can be done. 
It would be a pretty good idea to have jasper use tomcat-util buffers
directly - as you know, I  believe that would be a huge speedup.

Costin



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

Reply via email to