[Home] [By Thread] [By Date] [Recent Entries]

  • From: David <dlee@c...>
  • To: xml-dev@l...
  • Date: Fri, 09 Jul 2010 10:25:34 -0400

I believe most decent processors will "intern" the element names so they 
are not duplicated in memory.
Simply making element names longer only makes the serialized text format 
longer, not the in memory format (by much).

Now the serialized text format can be important when transmitting the 
XML text file across some boundry (or disk space),
as well as the time it takes to originally parse it (number of disk 
bytes read & size of string compars etc).


-------------------------
David A. Lee
dlee@c...
http://www.calldei.com
http://www.xmlsh.org


On 7/9/2010 10:17 AM, Nicholas Sushkin wrote:
> "Don't abbreviate without necessity" principle has been on my mind for quite a
> while. However, I always thought of memory consumption. Say you're
> transforming an XML file with 1 million P2E elements with XSLT processor.
> There is a big difference in memory consumption between the two element name
> styles.<P2E>20</P2E>  vs<price-to-earnings-ratio value="20"/>  is 5 vs 30
> characters and, since XSLT builds the whole tree in memory which say takes 4
> times the size of the file, about 20Mb vs 120Mb. Why wouldn't you save
> yourself some memory and trouble?
>
> My question, is my reasoning still valid or it's been outdated by some
> improvements in memory efficiency of XSLT processors?
>
> Thanks
>    


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member