<!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 &quot;normal&quot; 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 &quot;program&quot; 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 &quot;only&quot; 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>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XML in a&nbsp; Nutshell, 2nd Edition (O'Reilly, 2002)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</FONT>
<BR><FONT SIZE=2>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="http://www.cafeconleche.org/books/xian2/" TARGET="_blank">http://www.cafeconleche.org/books/xian2/</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</FONT>
<BR><FONT SIZE=2>|&nbsp; <A HREF="http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/" TARGET="_blank">http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/</A>&nbsp; |</FONT>
<BR><FONT SIZE=2>+----------------------------------+---------------------------------+</FONT>
<BR><FONT SIZE=2>|&nbsp; Read Cafe au Lait for Java News:&nbsp; <A HREF="http://www.cafeaulait.org/" TARGET="_blank">http://www.cafeaulait.org/</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</FONT>
<BR><FONT SIZE=2>|&nbsp; Read Cafe con Leche for XML News: <A HREF="http://www.cafeconleche.org/" TARGET="_blank">http://www.cafeconleche.org/</A>&nbsp;&nbsp;&nbsp; |</FONT>
<BR><FONT SIZE=2>+----------------------------------+---------------------------------+</FONT>
</P>

</BODY>
</HTML>