Hi There

I hope this is the right place to post this.  I'm porting an existing
C++/QT application to Java/SWT and I'm running into performance problems
with XML-RPC.  I'm running on Redhat 7.3 (server) and Fedora Core 1
(client).

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.

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.

The code I've used for benchmarking is available at:

http://www.clever.co.nz/pricom_jni_test.tar.gz

Any hints on how to improve the performance of this code would be
greatly appreciated.  I had thought of caching the XML-RPC client and 
using KEEPALIVE but I'm not sure how to go about this using the C++
libraries.

You can build and run this yourself, but you will have to change the URL
and FUNCTION variables in JNITest.java to point to an XML-RPC server on
your network.  You will need to have XML-RPC C++ and Java libraries
installed and to copy the xmlrpc*.jar into the lib directory.  The
server I'm using is a C XML-RPC server which talks to a proprietary
database, which is why I can't include it here.

Many thanks for reading.

Peter Butler

Reply via email to