in reply to Re^2: XML::Twig and threads
in thread XML::Twig and threads [solved]
I understand your situation at last.
So, copying original and reuse it will be like this.
It becomes slower than original with my machine. Because deep coping Elt object takes too much time for large XML. I wonder is this same at your environment? Or maybe you already know this ...my $t= XML::Twig->new(); $t->parsefile($inputFile); my $someData =$t->root->first_child; #someData for my $i(1 .. $loop) { for ( $someData->children_copy( 'managedObject') ){ handle_managedObject($t, $_); } print "Iteracja: $i / $loop \t-> OK\n"; $bID++; $someID = 0; }
As BrowserUK says, use strict and warning please.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: XML::Twig and threads
by BrowserUk (Patriarch) on Nov 29, 2012 at 00:36 UTC | |
by remiah (Hermit) on Nov 29, 2012 at 02:18 UTC | |
by BrowserUk (Patriarch) on Nov 29, 2012 at 02:49 UTC | |
by tye (Sage) on Nov 29, 2012 at 03:15 UTC | |
by grizzley (Chaplain) on Nov 29, 2012 at 13:18 UTC |
In Section
Seekers of Perl Wisdom