Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] URICache

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] URICache
  • Date: Mon, 29 Nov 2004 18:08:17 -0500

Wolfgang Hoschek wrote:

I think the URICache in Verifier was very good the way you had it.

The lastet CVS improvement also checks for equals(). I think that's a step back when you look at it from the point of lock contention in multi-threaded environments. You need to keep any work inside static synchronized blocks as brief as possible to avoid lock contention becoming an issue. So I'd happily trade 10% performance improvement for strongly reduced lock contention, leading to much better scalability. The URIs are almost always constants anyway...


The problem is in testing I noticed we were missing the cache a lot more often than I expected because of multiple, non-interned namespace URIs. I'm not sure where they were all coming from but they were there, so I checked for == first and equals() only on cache miss.

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