commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Plotnikov <>
Subject Re: [JXPath] how significant is CompiledExpression speed up?
Date Mon, 11 Aug 2003 15:37:41 GMT
Avoid the pitfall of premature optimization! There is no need to use
CompiledExpressions unless you have to.  If later you discover that you
have a performance problem caused by the number of different xpaths you
need to evaluate, then start using compiled expressions.  And, of
course, JXPath has a small internal cache of those. That cache should
suffice for casual use of JXPath.

- Dmitri

--- Psi Aushilfe3 <> wrote:
> Hi!
> How much time does it approximately take to compile an jxpath
> expression?
> To me it does make the source much more readable and understandable
> to
> have the xpaths directly in the code instead of referring compiled
> expression since the xpath itself very likely is more understandable
> than some variable name.
> So, why doesn't JXPathContext cache recurring jxpath expressions on
> it's
> own?

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

View raw message