David Golden schrieb:
On 1/24/07, Steffen Mueller <[EMAIL PROTECTED]> wrote:
An alternative would be to convince the A::Zip maintainer to provide a
$zip->member_names() function which breaks encapsulation of
A::Zip::Member from within the Archive::Zip distribution. The problems
are that a) A::Zip is currently very strict about this and I don't want
to be the one to change that and b) the author has been away for some
time and A::Zip is currently community maintained.

Looking at the source of Archive::Zip, this already exists as memberNames:

sub memberNames {
   my $self = shift;
   return map { $_->fileName() } $self->members();
}

Not really. As I said, A::Zip is pretty correct about encapsulation. $_->fileName() in *this* loop is exactly what's causing the code to be slow. This is a really tight loop. Replacing $_->fileName with $_->{fileName} is a major performance improver. It's also bad code. The question is: Should we pile yet another hack on top of the PAR Jenga tower? Extraction performance is abysmal right now and it's crucial to be reasonably fast.

Steffen

Reply via email to