[jdom-interest] Persisting a JDOM for later use
dms at sosnoski.com
Sun Oct 7 09:51:21 PDT 2001
There are at least three choices available for persisting a JDOM. Java serialization
is probably the easiest - just create the ObjectOutputStream, serialize and close -
but also the poorest performing. XML text is a little more of a nuisance to generate,
but is *the* standard for XML and much faster than Java serialization.
The third (and newest) alternative is XML Stream (XMLS), a technique I announced on
this list for JDOM about a week ago. XMLS is faster than text document generation,
but not necessarily great for long-term persistence (formats are subject to change
until production release, so if you write a document with the current release there's
no guarantee you'll be able to read it using the next release).
You can get full details on XMLS here:
http://www.sosnoski.com/opensrc/xmls/index.html Test results vs text and Java
serialization are here: http://www.sosnoski.com/opensrc/xmls/results.html
As for the document size you can have in memory, I can tell you that the memory size
in bytes looks to generally be about 4 times the text document size. If your system
has 64M available you probably could work with documents up to about 16M of text.
This is a rough figure, though.
Tapan Nanawati wrote:
> Hi all
> I make a soap call and get a return literal XML. I
> convert it to a JDOM Tree. I make some manipulations
> and extract data from that tree.
> Now since the data is a large amount of data, I dont
> want to waste my soap call and want to store the
> resultant JDOM tree for future use.
> # First: How can I persist my JDom tree
> # Second: How big a JDOM tree I can I have in memory
> without performance problems. (Any idea would do : for
> eg. size in kb of the data that can be put to JDOM
> tree without performance issues)
> Tapan Nanawati
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> To control your jdom-interest membership:
More information about the jdom-interest