Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: XSLT processing huge XMLs

by dakkar (Hermit)
on Feb 07, 2005 at 18:04 UTC ( [id://428768]=note: print w/replies, xml ) Need Help??


in reply to XSLT processing huge XMLs

You say:

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...

Perl is strongly typed, it just has very few types (Dan)

Replies are listed 'Best First'.
Re^2: XSLT processing huge XMLs
by Anonymous Monk on Feb 08, 2005 at 11:19 UTC
    If a given XSLT-program does not require access to the whole tree, e.g. by only using information in the current node, it is possible to do streamline processing where only the relevant part of the XML-file is kept in memory, and information is generated as soon as possible. I believe that the original XT did this, and that Xalan can do this for simple cases, but I have not researched on this for some time.
Re^2: XSLT processing huge XMLs
by morfeas (Novice) on Feb 08, 2005 at 07:44 UTC
    ...., or munging the data directly? Ok. I think (cause of its quickness) that mungs data directly How can we do that with perl?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://428768]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-19 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found