xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: norwoods <norwoods AT gbronline.com>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] QName flyweights
- Date: Thu, 09 Jun 2005 11:34:28 -0700
Wolfgang Hoschek wrote:
The current xom-1.1 CVS code is generally rather inefficient due to heavy usage of String.intern() in Element and Attribute and has less than optimal memory footprint. So, I'd like to float some ideas centered around more efficient handling of (prefix, localName, URI) tuples, both in space and time.
What could be done to reduce memory footprint and simultaneously improve performance, both when assembling a document in memory and when building it via Builder? Below is a commented prototype idea in this directionl, based on the "flyweight" pattern.
Comments, other ideas, anyone?
Wolfgang.
hashcodes do not map 1 to 1 to objects; more than one object may have any given hashcode. you need a strategy to deal with the possible conflict. this could violate the first xom Design Goal, Absolutely correct.
one could also have flyweight namespaces, uri and prefix; and flyweight qnames, flyweight namespace and local name.
setPrefix, setURI, setName, setLocalName are all complicated by flyweight qnames.
what is the garbage collection strategy? the qnames will remain in the hashmap even after all other references have disappeared.
norwood sisson
-
[XOM-interest] QName flyweights,
Wolfgang Hoschek, 06/09/2005
- Re: [XOM-interest] QName flyweights, Elliotte Harold, 06/09/2005
-
Re: [XOM-interest] QName flyweights,
norwoods, 06/09/2005
-
Re: [XOM-interest] QName flyweights,
Wolfgang Hoschek, 06/09/2005
- Re: [XOM-interest] QName flyweights, Wolfgang Hoschek, 06/09/2005
-
Re: [XOM-interest] QName flyweights,
Metalab, 06/09/2005
-
Re: [XOM-interest] QName flyweights,
Mik Lernout, 06/10/2005
-
Re: [XOM-interest] QName flyweights,
Wolfgang Hoschek, 06/10/2005
-
Re: [XOM-interest] QName flyweights,
Wolfgang Hoschek, 06/10/2005
- Re: [XOM-interest] QName flyweights, norwoods, 06/13/2005
- Re: [XOM-interest] QName flyweights, norwoods, 06/13/2005
- Re: [XOM-interest] QName flyweights, Wolfgang Hoschek, 06/13/2005
- Message not available
- Re: [XOM-interest] QName flyweights, Wolfgang Hoschek, 06/13/2005
-
Re: [XOM-interest] QName flyweights,
Wolfgang Hoschek, 06/10/2005
-
Re: [XOM-interest] QName flyweights,
Wolfgang Hoschek, 06/10/2005
-
Re: [XOM-interest] QName flyweights,
Mik Lernout, 06/10/2005
-
Re: [XOM-interest] QName flyweights,
Wolfgang Hoschek, 06/09/2005
Archive powered by MHonArc 2.6.24.