[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Internal entities removed from XML?


speed internal entity xml
From: "Rich Salz" <rsalz@d...>
 
> Sure, you made *my* code as efficient, but you made applications less
> efficient by requiring them to handle multiple calls for chardata.

I spent my early years in real-time assembler programming for microcontrollers:
writing UARTs for doing Hayes-style autodetect (which is one of the parent memes for
the XML encoding header): some people who had 6805-based modems in the late 80s 
perhaps used product that had my code in it. So I acknowledge that there are 
(or, at least, were) applications where every cycle and every byte counts.

Here, the applications do not need to be less efficient: for example, if the parser counted
each entity reference, then you can have two versions of downstream functions
that might care (and were important enough to warrant the space or care): one used 
while there are still entity references, and another for when there are no (or no more) 
references.  (i.e. this is a kind of "strategy"  pattern, I suppose).  The replacement of 
switches by function objects or dispatch arrrays iare two of the most basic speed optimizations 
around. 

That would add only a fixed couple of cycles per function per document if there are no
references.  Obviously, this is not an approach that would be convenient to
retro-fit onto code that was already created.   

> As I responded to Miles, the (dedicated?) application greatly benefits from
> knowing that the chardata is all in a single buffer, available all at once.

For the case of internal entities, the text can still be all in a single buffer
in my suggestion shows.  I was trying to point out that the claims that
supporting (internal) entity references for documents that normally won't 
have entity references *must* cause significant increase in space or
performance seem to fail to take into account some implementation
techniques. 

Cheers
Rick Jelliffe

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.