|Perl Monk, Perl Meditation|
Re: XSLT processing huge XMLsby dakkar (Hermit)
|on Feb 07, 2005 at 18:04 UTC||Need Help??|
found many probs with the XML parser, which holds to memory ALL the xml
Well, it's supposed to do that... to be able to use XSLT, you need the entire DOM (Document Object Model) in RAM, since XSLT allows random access to every part of the document.
About memory occupation: at the least, every element occupies tha space for its name, name and value of each attribute, and a couple of pointers (to parent and first child, for example). Meaning that a properly packed DOM can occupy a bit less space than the file it was parsed from. No implementation I know does it this packed, however: in order to be faster, usually. Yau should anyway see an occupation of less than twice the file size.
About the .NET solution: is it using XSLT, or munging the data directly? XSLT is not a really optimizable language, and implementations tend to be rather slow (even in C).
-- dakkar - Mobilis in mobile
Most of my code is tested...