Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Attributes performance patch

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Attributes performance patch
  • Date: Tue, 23 Nov 2004 09:06:50 -0500

I've checked in some more optimizations for namespace URI verification. There are two of these:

1. Caching the four most recently used URIs XOM doesn't check them again.
2. checkScheme returns immediately if the scheme is "http"

I did a few things differently than your implementation. Most significantly, I use == to compare namespace URIs rather than equals(). This speeds things up quite a bit in the common case where the strings are in fact the same string. This will be true if the string comes from a String literal or a Builder.

--
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




Archive powered by MHonArc 2.6.24.

Top of Page