You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by James M Snell <ja...@us.ibm.com> on 2001/03/29 07:17:40 UTC
food for thought
Just some food for thought. This was posted originally on soap-user.
- James Snell
Software Engineer, Emerging Technologies, IBM
jasnell@us.ibm.com (online)
jsnell@lemoorenet.com (offline)
Please respond to soap-user@xml.apache.org
To: soap-user@xml.apache.org
cc: SoapRMI <so...@extreme.indiana.edu>
Subject: almost as fast as RMI?
hi,
i have read and enjoyed the article about small and fast Electric XML
(from
http://www-106.ibm.com/developerworks/xml/library/x-elexml/).
the author at the end of the article states: "(...) the resulting parser
achieves the goal of processing a SOAP message about as quickly as RPC
over
RMI.(...)" - i was really intrigued by achieving near RMI performance but
there was no actual code to test and compare with other parsers to check
the
performance claim. therefore i have written a simple test that parses SOAP
message mentioned in the article and compares it with my XML Pull Parser
(XPP) - it can be downloaded from:
http://www.extreme.indiana.edu/~aslom/soapParseTest/
results: on Windows 2000 PII450Mhz/256MB with JDK 1.3.1 i have run parsing
100K times and found out that XPP is almost 5 times faster than Electric
XML
(it seems like an overhead of DOM alike parsing approach where there is a
lot
of elements created to represent parsed tree in memory):
ELECTRIC 100000 iterations in 74.037 [s] (1350 [iteration/s], 0.74
[ms/iteration])
XPP 100000 iterations in 15.282 [s] (6543 [iteration/s], 0.15
[ms/iteration])
i think that when sending Java serialized data by RMI there is much less
data
on the wire (at least 10 times - roughly: procedure name + 2 parameter
strings + some overhead) therefore theoretically RMI could be much faster
than SOAP/XML. however in practical situations for small messages that
fits
into one IP packet the performance bottleneck is not in CPU but in network
latency.
i think also that it would be interesting to have standard suite of tests
to
compare performance of different XML parsers when used in SOAP.
thanks,
alek
ps. here is output of actual test
>java -version
java version "1.3.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-beta-b15)
Java HotSpot(TM) Client VM (build 1.3.1beta-b15, mixed mode)
>java -cp .;PullParser.jar;lib\XML-1.1.jar SoapParseTest
SOAP SAMPLE:---
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:getRate xmlns:ns1="urn:demo1:exchange"
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<country1 xsi:type='xsd:string'>USA</country1>
<country2 xsi:type="xsd:string">japan</country2>
</ns1:getRate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---
ELECTRIC 100000 iterations in 74.037 [s] (1350.676013344679
[iteration/s],
0.74037 [ms/iteration])
XPP 100000 iterations in 15.282 [s] (6543.646119617851 [iteration/s],
0.15282 [ms/iteration])
--
Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom
As I look afar I see neither cherry Nor tinted leaves Just a modest hut
on the coast In the dusk of Autumn nightfall - Fujiwara no Teika
(1162-1241)
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org