[jdom-interest] Keeping an XML file in memory

citynomad lubman at bigfoot.com
Tue Jul 31 15:20:44 PDT 2007


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.



More information about the jdom-interest mailing list