Skip to Content.
Sympa Menu

xom-interest - RE: [XOM-interest] indexOf O(1) patch?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'Elliotte Harold'" <elharo AT metalab.unc.edu>, "'Wolfgang Hoschek'" <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: RE: [XOM-interest] indexOf O(1) patch?
  • Date: Tue, 1 Feb 2005 09:59:24 -0000

I agree that 4 bytes per node is a significant cost. I've been putting off
adding parent pointers to Saxon's TinyTree for that reason - it would help
significantly for wide trees (the typical RDBMS table dump of 100K records)
but that's not worth the increase from the current 29 bytes.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: xom-interest-bounces AT lists.ibiblio.org
> [mailto:xom-interest-bounces AT lists.ibiblio.org] On Behalf Of
> Elliotte Harold
> Sent: 01 February 2005 01:06
> To: Wolfgang Hoschek
> Cc: xom-interest AT lists.ibiblio.org
> Subject: Re: [XOM-interest] indexOf O(1) patch?
>
>
> > The additional memory (4 bytes) required per Node doesn't hurt much
> > either, considering how much memory is consumed by all
> sorts of other
> > info in node, element, text, etc. Perhaps Elliotte can
> profile memory by
> > parsing documents with java -verbose:gc and look at the
> final max memory
> > consumption.
> >
>
> I find it very hard to stomach four extra bytes per node. In my
> experience memory consumption is a huge problem for XML
> object models,
> and prevents people from using XML far more often than speed
> does. I've
> done extensive profiling on memory usage, and worked very
> hard to reduce
> each class down to the bare minimum. I'm still not quite
> there. They're
> a couple of indirections I can pull out, especially in ParentNode and
> Element, but mostly XOM is pretty small.
>
> To convince me to spend four more bytes per node, the speed
> increase is
> going to have to be phenomenal, like a factor of ten on common
> operations. I'm not going to be convinced by 30% on one
> method. And even
> then, I might push this off into a separate Ant target.
>
> --
> Elliotte Rusty Harold elharo AT metalab.unc.edu
> XML in a Nutshell 3rd Edition Just Published!
> http://www.cafeconleche.org/books/xian3/
> http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/
> ref=nosim
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>





Archive powered by MHonArc 2.6.24.

Top of Page