Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Performance problem when processing large attribute values

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Peter Murray-Rust <pm286 AT cam.ac.uk>
  • 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 14:03:04 +0100

On Thu, May 31, 2012 at 1:48 PM, Elliotte Rusty Harold
<elharo AT ibiblio.org>wrote:

> 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.
>
> I'm using the default parsers in Java 1.7 and XOM 1.1


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

Understood.

The file is
https://bitbucket.org/petermr/svg2semantic/src/eb9d5dd237e5/src/test/resources/org/xmlcml/graphics/pdf2svg/pages/page5.svg

P.

I wonder if it's changed between Java 1.6 and 1.7?



>
> --
> Elliotte Rusty Harold
> elharo AT ibiblio.org
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>



--
Peter Murray-Rust
Reader in Molecular Informatics
Unilever Centre, Dep. Of Chemistry
University of Cambridge
CB2 1EW, UK
+44-1223-763069




Archive powered by MHonArc 2.6.24.

Top of Page