Skip to Content.
Sympa Menu

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

xom-interest AT

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT>
  • To: dirk bergstrom <dirk AT>
  • Cc: xom-interest <xom-interest AT>
  • 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
Processing XML with Java (Addison-Wesley, 2002)

Archive powered by MHonArc 2.6.24.

Top of Page