[jdom-interest] Using NanoXML and JDOM

Jason Hunter jhunter at acm.org
Fri Oct 5 19:32:34 PDT 2001

Dennis Sosnoski wrote:
> My tests measured memory usage before and after building the document copies,
> but always after running through the code to make sure the class loading was
> done. I go through some pains to encourage garbage collection before measuring
> usage, to make sure I'm only measuring the memory that's actually used for the
> documents in a stable system.
>   - Dennis

Are you sure that's accurate?  In my OptimizeIt experience taking memory
marks before and after builds will often include the objects used during
the parse, and even when you call System.gc() your JVM likely does not
remove those objects.  It's only when you use a little *more* memory and
threaten to run out that the system really does a GC.  I found with that
testing model that consuming more memory can actually give the
impression of using less.


More information about the jdom-interest mailing list