Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] [ANN] nux-1.0beta2 release

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] [ANN] nux-1.0beta2 release
  • Date: Sun, 14 Nov 2004 10:15:28 -0800

On Nov 14, 2004, at 4:32 AM, Elliotte Harold wrote:

Wolfgang Hoschek wrote:

#1 Right, the Verifier URI sanity checks are quite involved, unfortunately. The JDOM checks are less involved (but also less strict). If you look at how java.net.URI is implemented (someone seems to have worked real hard on that code) you might, with luck, find some tricks that can help.

That makes a lot more sense. It occurs to me now that I could probably speed this up for the common case by caching three or four namespace URIs (it's a rare program that uses more than that) and not reverifying them for each and every element. Then however expensive the URI verification code is, you'd only need to pay the price once, at least most of the time. That might remove the need for one of your patches.

A small cache array might help quite a bit, indeed. Would need to synchronize or ThreadLocal reads and writes, since all in Verifier is static. Lock contention might become an issue.


I'll look at your benchmark code and see what I can do. Does the code include the sample documents as well?

No, but quite a few are linked from the javadoc. You might want to start with the XBIS datasets, e.g. soap.xml which is one of the "toughest".

One thing I've noticed while looking at this is that a lot of my tests cases I've been using to optimize are namespace free. I do need to do some more testing with documents that use namespaces.

There may be some surprises then. The Hashmap & Treesets manipulations typically also show up prominently on iteration for serialization, and also on deserialization. Tool-generated xml often contains lots of redundant namespace declarations.

Wolfgang.





Archive powered by MHonArc 2.6.24.

Top of Page