On Tue, Dec 7, 2010 at 10:02 PM, Niels Thykier <nthyk...@gmail.com> wrote:
>
>
> Hmm... could be interesting to see if we could do something about
> that. If time permits I will have a look.
>
> ~Niels
>

I guess I had time! Trivial testing on the eclipse-platform-data shows
that neither objdump-info[1] nor file-info are slow themselves.

The problem (in this case) is unpacked[2]:
$ time lintian ../eclipse/eclipse-platform-data_3.5.2-8_all.deb
N: unpacked took 3.707902 sec.
N: file-info took 0.03248 sec.
N: objdump-info took 0.00161 sec.

real    0m8.383s
user    0m4.644s
sys     0m0.924s

The actual timed part is:
    @ss = gettimeofday();
    my $opts = { err => "unpacked-errors" };
    spawn($opts,
            ['dpkg-deb', '--fsys-tarfile', "deb"],
            '|', ['tar', 'xf', '-', '-C', "unpacked"]);
    unless ($opts->{success}) {
        open(ERRORS, '<', "unpacked-errors")
            or fail("cannot open unpacked-errors: $!");
        print STDERR while <ERRORS>;
        close ERRORS;
        fail("dpkg-deb | tar failed with status ", $opts->{harness}->result);
    }
    @end = gettimeofday();

So the slow end here is (hopefully) the "dpkg-deb | tar" pipe, which
is sort of unfortunate (since I cannot think of a way to trivially
optimise this). According to a comment in unpacked, the pipe is done
to avoid the poor performance of dpkg-deb's syncing (which is not
really required for lintian's use).

~Niels

[1] Note eclipse-platform-data contains no binaries - only images etc,
so objdump-info may perform worse on a package with a lot of binaries.

[2] The timing info was only done on a binary package - so a source
package may do even better or even worse.



-- 
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