OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: SAX: Byte Streams and Character Streams

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <ak117@freenet.carleton.ca>
  • To: Xml-Dev List <xml-dev@ic.ac.uk>
  • Date: Sun, 19 Apr 1998 17:45:31 -0400

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@freenet.carleton.ca
Microstar Software Ltd.         dmeggins@microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS