Keeping an XML file in memory

citynomad <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
Hi all,

I have an application where I need to keep a rather large (currently ~40MB,
can get bigger) XML file in memory.  This document is used exclusively as a
source for multiple XSLT transformations.  

I am currently keeping it in a JDOM Document object and creating JDOMSource
objects from it as needed, but (after having to triple the heap size) I am
beginning to suspect that it isn't exactly the most memory-friendly
approach, since Document and JDOMSource classes must have a lot of overhead
that I don't need in this situation.  Is it true, and if so, what would be a
better way to store an XML doc in memory?  I am thinking of just using a
byte array and creating StreamSource's out of it.

Thanks in advance.

Eugene
-- 
View this message in context: http://www.nabble.com/Keeping-an-XML-file-in-memory-tf4196500.html#a11935086
Sent from the JDOM - General mailing list archive at Nabble.com.

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.