Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Possible ArrayList optimization

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: dirk bergstrom <dirk AT juniper.net>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Possible ArrayList optimization
  • Date: Tue, 13 May 2003 07:56:40 -0400

At 7:52 PM -0700 5/12/03, dirk bergstrom wrote:

well, you probably don't want to start too big, since as you build a
document you'll have un-trimmed ArrayLists for many of the nodes.

No, I was thinking you'd call trimToSize() from the endElement() method, not the endDocument() method. This wouldn't have more than a few untrimmed elements at any one time. The default of 10 may be adequate.
--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page