[jdom-interest] JDOM XML Outputter vs. JDOM serialization
Martin Schulz
schulz at videotron.ca
Thu Nov 14 17:25:28 PST 2002
Regarding XMLS (www.sonoski.com), it appears to not be actively
maintained. I had to apply a simple fix before I
got it to work. The benchmarks are good, but not that good. And
compression is best implemented on top of the XML document.
But the main concern is exactly what I wanted to avoid by producing the
document: Not tying myself to a specific platform or implementation.
Subsequently, I collected some timing information and it appears that on
a 1.6G Athlon:
- producing the XML is cheap ( 2ms per document of 49k in a loop)
- producing the gzip compressed XML is cheaper ( 0.8 ms )
- gunzip cheap, similar to gzip
- parsing and creating the JDOM Document: expensive (120ms)
Using the Piccolo SAXParser, I could shave off 20% of the parsing cost,
but that is still a lot!
I am also interested in a solution which allows to save memory by
reusing Element and Attribute name Strings.
Also, I was having weird problems setting Piccolo as the default parser,
SAXBuilder was completely
failing, unless I gave it the class name as a String.
Does anybody know whether that is being looked at?
Martin
-----Original Message-----
From: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org]
On Behalf Of Bradley S. Huffman
Sent: November 10, 2002 9:23 PM
To: Martin Schulz
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] JDOM XML Outputter vs. JDOM serialization
Martin Schulz writes:
> Hello,
>
> I am looking at comparing JDOM to/from XML byte stream versus JDOM
> (de)serialization.
>
> For general architectural reasons I'd be inclined to pick the XML byte
> stream solution, But I also wouldn't be surprised if the XMLOutputter
> beat the serialized version, not speak of gzipped XML byte streams.
>
> Anybody care to share their experience?
Using Dennis Sosnoski's XMLBench code (www.sosnoski.com) for timing, it
seems faster to use XMLOutputter/SAXBuilder for serialization then
Java's serialization mechinism which does alot of housekeeping to
prevent cycles (something a XML document never has).
Brad
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@you
rhost.com
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 04/09/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 04/09/2002
More information about the jdom-interest
mailing list