[jdom-interest] JDOM Document size
Matthew MacKenzie
matt at xmlglobal.com
Thu Feb 8 19:59:35 PST 2001
Yeah, as I said ... really rough :-) If you are happy with a "general idea"
measurement, this is one way among many.
Cheers,
-matt
<<| message from: Jason Hunter <jhunter at collab.net> |>>
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-
>
>
<<| end message from Jason Hunter <jhunter at collab.net> |>>
--
Matthew MacKenzie
VP Research & Development, Founder
XML Global Technologies, Inc.
More information about the jdom-interest
mailing list