Just for your information and for the record.

Kees Cook wrote:
> On Tue, Aug 18, 2009 at 12:20:08PM +0200, Frans Pop wrote:
> > > Is this patch still needed? I've never seen the problem myself on
> > > Lenny and as this BR predates Lenny I'm wondering if it's not a
> > > non-issue or a workaround for some bug in libcompress-zlib-perl
> > > that got fixed in the mean time.
> >
> > Although not strictly needed anymore, I've applied the patch anyway
> > as your version seems a bit less fragile to me than the original
> > code.
>
> Okay, cool.  I hadn't had time yet to re-check it.

Today I've rewritten the whole thing. It turns out that the double loop in 
that function is extremely slow. Timings are the same for the original 
version and your modified version.

On my (partial) mirror, parsing a Packages file would take 18 seconds.
I've now rewritten it and the speedup is a factor 30!

The new code now actually makes use of setting $/ = "\n\n" so that the 
complete information for  package is read in a single read.

gzreadline does not even support that option, although I suspect that is 
_exactly_ the change that broke the script in the first place. And in 
that case it was not a bug in perl, but in debmirror as debmirror defined 
$/ while reading the file in a way that was inconsistent with that.

So we may have been the cause of reverting a desired enhancement of 
gzreadline :-/

Cheers,
FJP



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to