commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanouil Batsis <>
Subject [JXPath] Compiled Expressions Cache Impl? (was: Re: JXPath: Thread-Safe Behavior and Real-Time Applications)
Date Tue, 02 Nov 2004 11:28:26 GMT


Dmitri Plotnikov wrote:

>JXPath maintains a global cache of those.  Since that cache is of limited size and is
shared by all threads, the performance may suffer when all these threads start storing their
load of XPaths in that cache. What I would recommend is disabling the automatic caching (for
that there is a global variable on JXPathContextImpl) and maintain application's own cache
of compiled expressions.

Thanks for the above, *very* informative as I also have thread-safety 
requirements on XML trees of unknown structure and size. I was thinking 
of implementing a statistics-and-total-cache-size-based mechanism  to 
figure out frequently used expressions, then store those, but I'm not 
sure how accessible the JXPath cache is (can i selectively store and 
remove compiled expressions?), or how easily another cache can be 
implemented and what that should be like... any suggestions?

Many thanks,


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message