Xponent logo Xponent
Specialists In Large XML Documents Privacy Policy  Contact

Xponent's Mostly XML Blog


Browsers Don't Get XML

One would think that with the pervasiveness of XML, Internet browsers would do a good job of handling XML files. But they don't. They are horribly slow or cannot load them at all. For some the reason is they try to load the entire XML into memory.

I tried IE8 with a twelve megabyte XML located on my local hard drive. IE instantly displayed the beginning of the file, but after several minutes it displayed a message that the file could not be loaded. This is not a big XML file in today's world where XML files hundreds of megabytes to several gigabytes are not rare (search the web for "Large XML" for some examples).

Firefox also failed to handle the same file; it never showed any of the file and stopped responding after about four minutes. Notepad++ and XML Notepad 2007 both opened this file in under five seconds.

When the entire XML tree is created in memory, the amount of RAM needed is several times the size of the XML file and the RAM to file size ratio grows with the file size. I had 850 megabytes of free memory available when I tried to open my twelve megabyte XML that was not fragmented. As the XML tree is created in memory, performance degrades at an accelerating rate as the browser calculates where each node should be inserted in the ever-growing tree.

This is a solvable problem. A simple buffering-caching system will do the trick.

Google's Chrome does not render XML. It displays only the values of XML nodes. If the XML references an XSL stylesheet, it either displays nothing, or the unrendered XML, depending on the version.

Submitted by Bill Conniff, Founder of Xponent, on September 7, 2010




Copyright Ⓒ 2008-2023. Xponent LLC. All rights reserved.