Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jul 2007 14:17:16 -0700 (PDT)
From:      youshi10@u.washington.edu
To:        ports@freebsd.org
Cc:        hackers@freebsd.org
Subject:   Re: Finding slowdowns in pkg_install
Message-ID:  <Pine.LNX.4.43.0707061417160.28275@hymn09.u.washington.edu>
In-Reply-To: <20070706170750.GA99504@lpthe.jussieu.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Jul 2007, Michel Talon wrote:

> Tim Kientzle said:
>
>> One approach I prototyped sometime back was to use
>> libarchive in pkg_add as follows:
>>    * Open the archive
>>    * Read +CONTENTS directly into memory (it's
>> guaranteed to always be first in the archive)
>
> I can only concur with that. In my program
> http://www.lpthe.jussieu.fr/~talon/check_pkg.py
> i discovered that memory mapping +CONTENTS and then working
> in memory before rewriting it was around 5 times faster
> than reading line by line and parsing each line. See function
> fix_pkg_database(). By the way i am writing a new +CONTENTS
> fileand then renaming it, which avoids leaving a mess if
> something goes astray like portupgrade does.
>
>
> --
>
> Michel TALON

     Ok, excellent I'll try that then.
     I'll work on an improved parser this weekend and probably will have more conclusive results for next week, but for the immediate point in time I'll post results on how slow / fast the critical sections were once I return home and post process my data again for averages and standard deviations. I'll use this as my basis for further conclusions this summer.
-Garrett




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.43.0707061417160.28275>