<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>SV: SV: [jdom-interest] Memory problem</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>No. I'm using the XML documents as a simple database. The RMI object only act as a remote facade to access the XML. The data that is sent through RMI is "normal" data objects instantiated from XML data instead of a jdbc result set (I like Xpath better then SQL).</FONT></P>
<P><FONT SIZE=2>The memory problem I had is solved since I checked out the latest code from CVS (think it was something with StringBuffers according to a mail by Jason).</FONT></P>
<P><FONT SIZE=2>/Marcus</FONT>
</P>
<P><FONT SIZE=2>-----Ursprungligt meddelande-----</FONT>
<BR><FONT SIZE=2>Från: Elliotte Rusty Harold [<A HREF="mailto:elharo@metalab.unc.edu">mailto:elharo@metalab.unc.edu</A>] </FONT>
<BR><FONT SIZE=2>Skickat: den 21 oktober 2002 13:21</FONT>
<BR><FONT SIZE=2>Till: Marcus Andersson; 'jdom-interest@jdom.org '</FONT>
<BR><FONT SIZE=2>Ämne: Re: SV: [jdom-interest] Memory problem</FONT>
</P>
<BR>
<P><FONT SIZE=2>At 8:53 PM +0200 10/17/02, Marcus Andersson wrote:</FONT>
<BR><FONT SIZE=2>I have perhaps not used the most scientific way. I comment out the </FONT>
<BR><FONT SIZE=2>code that builds the document and checks how big the program becomes. </FONT>
<BR><FONT SIZE=2>Then I uncomment the lines that builds the document and then checks </FONT>
<BR><FONT SIZE=2>the size again. I then take the second value and subtract with the </FONT>
<BR><FONT SIZE=2>first value. Very simple. The "program" is a RMI object and the only </FONT>
<BR><FONT SIZE=2>thing that happens before the document parsing is that I bind the RMI </FONT>
<BR><FONT SIZE=2>object to the registry. The program takes about 40Mb without the </FONT>
<BR><FONT SIZE=2>document and about 150Mb with the document (which tells me that I </FONT>
<BR><FONT SIZE=2>have to revise what I said earlier, the document is "only" about </FONT>
<BR><FONT SIZE=2>110Mb big in memory).</FONT>
</P>
<BR>
<P><FONT SIZE=2>You say you're using RMI. Are you actually serializing the Document </FONT>
<BR><FONT SIZE=2>using object serialization?</FONT>
<BR><FONT SIZE=2>-- </FONT>
</P>
<P><FONT SIZE=2>+-----------------------+------------------------+-------------------+</FONT>
<BR><FONT SIZE=2>| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |</FONT>
<BR><FONT SIZE=2>+-----------------------+------------------------+-------------------+</FONT>
<BR><FONT SIZE=2>| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |</FONT>
<BR><FONT SIZE=2>| <A HREF="http://www.cafeconleche.org/books/xian2/" TARGET="_blank">http://www.cafeconleche.org/books/xian2/</A> |</FONT>
<BR><FONT SIZE=2>| <A HREF="http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/" TARGET="_blank">http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/</A> |</FONT>
<BR><FONT SIZE=2>+----------------------------------+---------------------------------+</FONT>
<BR><FONT SIZE=2>| Read Cafe au Lait for Java News: <A HREF="http://www.cafeaulait.org/" TARGET="_blank">http://www.cafeaulait.org/</A> |</FONT>
<BR><FONT SIZE=2>| Read Cafe con Leche for XML News: <A HREF="http://www.cafeconleche.org/" TARGET="_blank">http://www.cafeconleche.org/</A> |</FONT>
<BR><FONT SIZE=2>+----------------------------------+---------------------------------+</FONT>
</P>
</BODY>
</HTML>