Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] baseURI / systemID question

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] baseURI / systemID question
  • Date: Mon, 13 Sep 2004 20:24:53 -0400

Bradley S. Huffman wrote:


It's URLEncode.encode(String) which for each call creates a StringBuffer,
a StringWriter, a ByteArrayOutputStream, and a array of bytes.

That's probably it, but there's also a couple of methods that are called unnecessarily in each pass through the loop; or rather one method and on static field lookup. I've pulled them both out of the loop, eliminated the second branch of the if statement, and replaced the call to URLEncoder.encode(String) with a table lookup for the common case of the printable ASCII characters. When I have a little more time I can maybe figure out how to eliminate URLEncoder.encode(String) for the non-ASCII characters as well.


--
Elliotte Rusty Harold
elharo AT metalab.unc.edu





Archive powered by MHonArc 2.6.24.

Top of Page