in reply to Re: Prune Twig From Huge XML File
in thread Prune Twig From Huge XML File

Hi, Thanks for the quick response, wow! I'll try that, thanks. I had already tried $content->ignore, but it didn't seem to speed things up. I am using 5.8. Perhaps the reason SAX was so quick is that is feeds data to a handler in chunks which I can ignore as soon as soon as my maximum length is reached...? Dunno, I am a beginner...

Replies are listed 'Best First'.
Re^3: Prune Twig From Huge XML File
by mirod (Canon) on Mar 16, 2009 at 21:44 UTC

    It makes sense, I'll have to look at it tomorrow, it is indeed likely that XML::Twig reads the entire content of the element (worse than that, it probably buffers it, which implies copying it a few times...) before discarding it. I'll see if I can improve this.