← Prev in month ← Prev in thread
Next in thread → Next in month →

Java SAX Speed (Was: Pushing SAX events out onto the Web?)

From
Jochen Wiedmann <>
To
Date
2002-08-14T06:45:39Z
ID
<>
Thread
Java SAX Speed (Was: Pushing SAX events out onto the Web?)
Hi, Roger,

I have Java classes available that

  a) Convert SAX events into a binary stream and tha
  b) convert such a binary stream into SAX events

If you are interested, I will send them to you.


Btw, that brings me to another question, which may
be of interested to Dare:

I originally wrote this classes with the idea to
replace the SAX generator with a C library. I hoped
that reading the binary stream and converting it into
SAX might be much more efficient than using a SAX
parser to read the serialized XML and converting
that into a SAX stream.

However, the result was *quite* surprising:

- Running the examples for the first time gave the
  expected result: The actual XML parser took about
  150 ms, my binary parser took 10 ms.

- Running the examples a second time (in a loop)
  changed the times to about 40 ms and 10 ms.

- And repeating the examples over and over again
  resulted in an average time of 10 ms both, the
  actual XML parser (Crimson) being indeed slightly
  faster

I though of Hotspot, but I doubt that it can speed
up an XML parser that much. And using the classic
engine didn't change matters.

Any explanations or ideas?


Regards,

Jochen
← Prev in month ← Prev in thread
Next in thread → Next in month →