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: 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] URICache
  • Date: Mon, 29 Nov 2004 15:44:42 -0800

On Nov 29, 2004, at 3:08 PM, Elliotte Harold wrote:

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.


Sounds like an issue worthwhile to cross-check with the xerces folks.





Archive powered by MHonArc 2.6.24.

Top of Page