Making a XML::Parser App Multithreaded

R

Raymond O'Connor

I wrote an application to parse a large xml file (over 20GB) using
XML::parser. It runs on a multicore system, however, and takes forever
since it uses only one core. Maybe this is more of a SAX question, but
is there anyway to rewrite my app so that it takes advantage of multiple
cores?

Thanks
 
R

Robert Klemme

I wrote an application to parse a large xml file (over 20GB) using
XML::parser. It runs on a multicore system, however, and takes forever
since it uses only one core. Maybe this is more of a SAX question, but
is there anyway to rewrite my app so that it takes advantage of multiple
cores?

Not the parsing part, because there is no way that you can parallelize
reading an XML file and stream parsing it in a reasonable way (you would
have to stuff all parse events into a queue anyway to make sure they are
processed in the correct order).

For the rest it depends on what you do with parse results. For that we
would need more detail.

Kind regards

robert
 
R

Raymond O'Connor

Robert said:
Not the parsing part, because there is no way that you can parallelize
reading an XML file and stream parsing it in a reasonable way (you would
have to stuff all parse events into a queue anyway to make sure they are
processed in the correct order).

For the rest it depends on what you do with parse results. For that we
would need more detail.

Kind regards

robert

It's pretty much the parsing that I need to speed up, so it looks like
I'll have to live with it for now. Thank you very much for the
response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top