Re: SAX: Byte Streams and Character Streams
Tim Bray writes: > Hmmm, for what it's worth, Lark, both in its current form and > after the big performance update coming Real Soon Now, works > at approximately equal speed off byte and character streams... > the overhead of pouring a buffer's worth of bytes into the > internal character buffer that Lark will be reading from > is hardly detectable. The next Lark will not be as fast as XP but > it won't be that much slower. I'd be interested in what the other > parser builders have done in this area. -T. AElfred reads a big buffer (up to 32K) of bytes, then translates it into a big buffer of characters using whatever the current encoding scheme is. Profiling shows that the overhead of doing this is surprisingly low, since it all happens in a tight loop. AElfred can now also read directly from a Reader, bypassing the conversion altogether. The Lark driver in the current pre-release of SAX feeds a character stream to Lark as an InputStream of UTF-8 bytes, using a surprisingly inefficient algorithm that I can fix when I have time. Will the next version of Lark support character streams? All the best, David -- David Megginson ak117@f... Microstar Software Ltd. dmeggins@m... http://home.sprynet.com/sprynet/dmeggins/ xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format