This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] A setup.exe performance enhancement


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  <jon.turney@dronecode.org.uk>
>
>	* IniDBBuilderPackage.cc (IniDBBuilderPackage): Remove db.packages vector
>	sorting.
>	(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
>	used.

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.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]