You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Ravishankar S (JIRA)" <ji...@apache.org> on 2006/10/20 08:20:36 UTC

[jira] Commented: (EL-5) [el] Contention on global cache / parseExpression

    [ http://issues.apache.org/jira/browse/EL-5?page=comments#action_12443708 ] 
            
Ravishankar S commented on EL-5:
--------------------------------

Confirmed Matthias's observation at high concurrencies. We didn't see anything at lower concurrent access. We have a page that uses a lot of EL tags and expressions and this bug killed our tomcat and we had to keep restarting tomcat every 15 minutes before it started all over again

Somebody needs to take a good, hard, long look at this. 

> [el] Contention on global cache / parseExpression
> -------------------------------------------------
>
>                 Key: EL-5
>                 URL: http://issues.apache.org/jira/browse/EL-5
>             Project: Commons EL
>          Issue Type: Bug
>    Affects Versions: 1.0 Final
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Matthias Ernst
>         Attachments: patch, patch-el-cache.txt
>
>
> The ExpresssionEvaluatorImpl maintains a static synchronized hashmap as a global
> parser cache. In my tests, this proves to be a contention point in highly
> concurrent web access, even if the cache is already filled:
> "tcpConnection-8080-514" daemon prio=1 tid=0x08214890 nid=0x4e39 waiting for
> monitor entry [bd9ff000..bd9ff908]
>         at java.util.Collections$SynchronizedMap.get(Collections.java:1942)
>         - waiting to lock <0x45586ef0> (a java.util.Collections$SynchronizedMap)
>         at
> org.apache.commons.el.ExpressionEvaluatorImpl.parseExpressionString(ExpressionEvaluatorImpl.java:306)
> ...
> Even pre-parsing the expressions through #parseExpression doesn't help: it
> parses the expression for syntactic correctness and returns an instance of
> JSTLExpression that, however, doesn't contain the parsing result. It is reparsed
> on every evaluation.
> I propose
> * evaluator instance local caches that still need synchronization, but can be
> made thread-local, page-local oder whatever by the calling application / container.
> * to actually maintain the parsing result in JstlExpression
> I would volunteer to develop the respective patches, if desired.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org