[jdom-interest] JDOM Document size
b0b at inreach.com
Wed Feb 7 11:10:36 PST 2001
>From: "GABBELMANN,GREG (Non-HP-PaloAlto,ex1)" <greg_gabbelmann at non.hp.com>
>To: "'jdom-interest at jdom.org'" <jdom-interest at jdom.org>
>Date: Tue, 6 Feb 2001 17:59:50 -0800
>I've been using JDOM with great success on my e-commerce project. However,
>to improve speed I had to implement a cache so that frequently accessed XML
>files weren't repeatably parsed. My question is regarding the size of a
>Document: does anyone know what the average size of a JDOM Document is
>relative to its source XML? I realize that many factors are involved, so
>not expecting a single number.
I was faced with a similar problem. Instead of caching the JDOM Document, I
opted to read it into a serializable Java class. This worked very well and
is very fast. The resulting bean is smaller than the source XML.
It never occurred to me to cache the JDOM Document, though, so I don't have
a direct answer to your question. My class has methods for reading and
writing the XML via JDOM when necessary, but I use serialization instead of
XML for persistance within my application.
More information about the jdom-interest