xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] Performance problems with very large attribute strings
- From: Michael Kay <mike AT saxonica.com>
- To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] Performance problems with very large attribute strings
- Date: Sun, 6 Oct 2013 10:28:31 +0100
>
> Would there be any difference between attribute content and element
> content?
>
I think it's more likely that parser designers have thought carefully about
how to handle long text nodes than about how to handle very long attributes.
For example, the SAX interface allows character data to be broken up into
chunks as the parser sees fit, and to be passed as a reference into a char[]
array, whereas attribute values have to be passed as a single String. It
wouldn't surprise me if the case of attribute values crossing buffer
boundaries is considered sufficiently rare that a simple string concatenation
is used, which implies quadratic performance as the attribute length
increases. That's pure conjecture, but it seems consistent with what you are
seeing.
Michael Kay
Saxonica
-
[XOM-interest] Performance problems with very large attribute strings,
Peter Murray-Rust, 10/05/2013
-
Re: [XOM-interest] Performance problems with very large attribute strings,
Michael Kay, 10/05/2013
-
Re: [XOM-interest] Performance problems with very large attribute strings,
Peter Murray-Rust, 10/06/2013
-
Re: [XOM-interest] Performance problems with very large attribute strings,
Dave Pawson, 10/06/2013
- Re: [XOM-interest] Performance problems with very large attribute strings, Peter Murray-Rust, 10/06/2013
-
Re: [XOM-interest] Performance problems with very large attribute strings,
Michael Kay, 10/06/2013
- Re: [XOM-interest] Performance problems with very large attribute strings, Peter Murray-Rust, 10/06/2013
-
Re: [XOM-interest] Performance problems with very large attribute strings,
Dave Pawson, 10/06/2013
-
Re: [XOM-interest] Performance problems with very large attribute strings,
Peter Murray-Rust, 10/06/2013
-
Re: [XOM-interest] Performance problems with very large attribute strings,
Elliotte Rusty Harold, 10/06/2013
- Re: [XOM-interest] Performance problems with very large attribute strings, Peter Murray-Rust, 10/06/2013
-
Re: [XOM-interest] Performance problems with very large attribute strings,
Michael Kay, 10/05/2013
Archive powered by MHonArc 2.6.24.