xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] Performance problem when processing large attribute values
- From: Elliotte Rusty Harold <elharo AT ibiblio.org>
- To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] Performance problem when processing large attribute values
- Date: Thu, 31 May 2012 08:48:13 -0400
I bet if you profile this you'll find that the parser is using a
StringBuilder (or, worse yet, a StringBuffer) to build up the
attribute. And that it's spending a lot of time resizing the buffer
since it probably starts with a pretty low capacity like 16.
By contrast, when working with PCDATA the parser is using an array
that it doesn't have to resize because it can pass it to XOM in
chunks.
--
Elliotte Rusty Harold
elharo AT ibiblio.org
-
[XOM-interest] Performance problem when processing large attribute values,
Peter Murray-Rust, 05/31/2012
-
Re: [XOM-interest] Performance problem when processing large attribute values,
Elliotte Rusty Harold, 05/31/2012
-
Re: [XOM-interest] Performance problem when processing large attribute values,
Elliotte Rusty Harold, 05/31/2012
- Re: [XOM-interest] Performance problem when processing large attribute values, Peter Murray-Rust, 05/31/2012
-
Re: [XOM-interest] Performance problem when processing large attribute values,
Elliotte Rusty Harold, 05/31/2012
-
Re: [XOM-interest] Performance problem when processing large attribute values,
Elliotte Rusty Harold, 05/31/2012
Archive powered by MHonArc 2.6.24.