Hello Guys,
I'm getting the "Out of memory!" error from ActivePerl 5.10 (1003) running
on a box with Intel Core 2 Duo 2.4 Ghz with 4 GB in ram with Windows XP Pro.
I'm using XML::Simple to parse a 120 MB XML file. My code so far is as
simple as this:
-----------------------------
use strict;
use warnings;
use XML::Simple;
my $xml = XMLin('file.xml');
-----------------------------
That's pretty much all I need to get the "Out of memory!" error after 90
seconds. As I see it, the XML file is really big, but should never be enough
to overrun this computer's (or Perl's) capacity.
I opened the task manager to watch the memory usage while the script was
running and I could see how the memory was getting used by Perl until it's
using about 3 GB before aborting.
While looking for an answer in Google, I found that several people using the
XML submodules are getting an "Out of memory!" error with big files.
Is this a matter of bad memory usage from XML::Simple? Does anyone know a
better way to parse huge XML files?
I mean... this is embarrassing to me, I'm the biggest Perl promoter and
defender here at work and I refuse to tell the others that Perl won't be
able to parse an XML file without crashing! It's gotta be a better way... Am
I right? :-|
Cheers,
Paco
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs