Subject: | Listing members is pretty slow |
I'm using a simple loop to get the names of members in an archive, like so:
my $zip = IO::Uncompress::Unzip->new(shift);
my $status;
for ($status = 1; $status > 0; $status = $zip->nextStream()) {
my $name = $zip->getHeaderInfo()->{Name};
say "Processing member $name" ;
last if $status < 0;
}
It's pretty slow when it encounters large members, so I'm guessing it's scanning through the whole record rather than seeking to each record's start. Is that correct? Is there some opportunity for improvement there?
BTW I'm using version 2.033, not the latest, because I'm having some trouble upgrading (see https://rt.cpan.org/Ticket/Display.html?id=87516).
Thanks.