Peter Butler wrote:

I've profiled the Java app and the biggest bottleneck by far is in XML
parsing.  There are no issues with performance in the existing C++
application so I reasoned that using the C++ XML-RPC libraries in the
Java application should speed things up significantly.

Are you sure? I can hardly imagine, because the actual XML parsing is done via SAX, which is typically a low memory profile, fast way for parsing XML. Based on my experiences, I would assume that parsing a typical XML document takes between 10 and 50 ms, which is comparable to a database query.



I've used JNI to implement enough of a wrapper around C++ XML-RPC
libraries to do some benchmarking, but the results are a bit odd.  The
Java version runs slowly for the first test then speeds up as the JIT
compiler kicks in.  The C++ version runs at a consistent speed but is
still only comparable in speed to the Java version.

That's what I would have expected. I considered a JNI parser as a Xerces replacement in the past, for performance reasons as well, and found that it wasn't really faster.




Can you publish the *results*, so that we are able to discuss them? In particular, a heap dump would help. (How many objects of what kind have been created and where.)


Jochen



Reply via email to