[jdom-interest] Re: size of a JDOM document

David Churchville dmc at clearlight.com
Fri Feb 9 10:02:28 PST 2001


If you use a profiler like OptimizeIT, along with THEIR VM, you should be
able to run guaranteed GCs under this environment and see the memeory usage
using the apporach below.

--Dave

> Message: 13
> From: "Brett McLaughlin" <brett at newInstance.com>
> Cc: <jdom-interest at jdom.org>
> Subject: RE: [jdom-interest] JDOM Document size
> Date: Thu, 8 Feb 2001 23:13:10 -0600
>
> Officially, System.gc() only lets the VM know that garbage collection
> "should" be performed now. It is a suggestion, and entirely up to the VM
and
> threading mechanism as to do anything about it. In other words, as Jason
> says, don't count on it doing anything, and if it does, it won't do it all
> the time, on all VMs :( IMO, they should have left the method out of the
> API...
>
> -Brett
>
> > -----Original Message-----
> > From: jdom-interest-admin at jdom.org
> > [mailto:jdom-interest-admin at jdom.org]On Behalf Of Jason Hunter
> > Sent: Thursday, February 08, 2001 8:44 PM
> > To: Matthew MacKenzie
> > Cc: quasar at b0b.com; jdom-interest at jdom.org
> > Subject: Re: [jdom-interest] JDOM Document size
> >
> >
> > Matthew MacKenzie wrote:
> > >
> > > It might be possible to guage the size of a DOM rather
> > unscientifically by
> > > first running the program with a very simple xml file, such as <doc
/>,
> > > recording the
> > > memory footprint, then running a more complex document with a
> > wide variety
> > > of components
> > > (attributes, elements, cdata, etceteras) and also recording its
process
> > > size.  Subtract a from b and
> > > you should have a really rough estimate.
> >
> > That approach suffers from the problem that all temporary objects
> > created during the build will be represented despite the fact they're
> > not in the document.  You might try a System.gc() but we've found here
> > before that it doesn't really do a full gc, if it does a gc at all.
> > (Testing on JDK 1.2.2 Windows shows System.gc() does nothing.)
> >
> > -jh-
> > _______________________________________________
> > To control your jdom-interest membership:
> > http://lists.denveronline.net/mailman/options/jdom-interest/yourad
> dr at yourhost.com
>
>
>
> --__--__--
>
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>
> End of jdom-interest Digest




More information about the jdom-interest mailing list