This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH] A setup.exe performance enhancement
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 19 Nov 2010 14:49:21 -0500
- Subject: Re: [PATCH] A setup.exe performance enhancement
- References: <4CE6A0BB.email@example.com>
- Reply-to: cygwin-apps at cygwin dot com
On Fri, Nov 19, 2010 at 04:07:23PM +0000, Jon TURNEY wrote:
>Change package_db collection of packages from vector to a map so we can look things up in it quickly
>This allows packagedb::findBinary() and packagedb::findSource() to be re-written to locate packages
>by name rather than searching the entire set, which makes a big difference to total execution time.
>2010-11-19 Jon TURNEY <firstname.lastname@example.org>
> * IniDBBuilderPackage.cc (IniDBBuilderPackage): Remove db.packages vector
> (buildPackage, buildPackageSource): Change package collection from vector
> to map.
> * PickView.cc (setViewMode, init_headers, defaultTrust): Ditto.
> * choose.cc (createListview, logResults, keepClicked)
> (changeTrust): Ditto
> * install.cc (do_install_thread): Ditto
> * download.cc (do_download_thread): Ditto
> * prereq.cc (isMet): Ditto
> * package_meta.cc (ScanDownloadedFiles): Ditto
> * package_db.h (packagedb): Ditto
> * package_db.cc (packagedb, flush, markUnVisited, setExistence)
> (fillMissingCategory): Ditto
> (findBinary, findSource): Rewrite to locate packages in map rather than
> searching the whole vector, for performance.
> (ConnectedLoopFinder, doIt, visit): Rewrite to refer to package using a
> packagemeta *, as an index into the vector of packages can no longer be
I was just marvelling today at the inexplicable pauses in setup.exe. Will this
reduce the amount of time that setup.exe takes parsing setup.ini?
Assuming that the answer is ok, I'm happy with this change but I'd like to get
Corinna's ok, too since it is sort of invasive.