views:

16

answers:

0

I am using the NUX library to run ~20 xpaths queries on an XML ~20KB in two different settings, one in a JUnit test, the other inside a bean in a Jetty servlet (hence running in a multi-threaded scenario.) It seems like when ran in Junit, it is evaluating the XPaths in ~8ms, whereas in the Jetty servlet it is taking ~80ms to evaluate. In both cases, the XPaths and the XML files are the same. What could be causing this performance difference? Could Jetty or another service be overwriting NUX/SAX's configuration? Please note that when I am running this comparison, there is no other computation hapening in the Jetty servlet, and the servlet is configured to have a single executer thread.