Subject: CVS commit: pkgsrc/mk/scripts
To: None <pkgsrc-changes@NetBSD.org>
From: Dan McMahill <dmcmahill@netbsd.org>
List: pkgsrc-changes
Date: 05/20/2005 04:39:44
Module Name: pkgsrc
Committed By: dmcmahill
Date: Fri May 20 04:39:44 UTC 2005
Modified Files:
pkgsrc/mk/scripts: genreadme.awk
Log Message:
Rework how the lookup of binary packages in the cache is performed.
As data for a given binary package is loaded, increment a count
stored with PKGPATH as the index. Then use a psuedo-multidimensional
array with PKGPATH and the # as the index. This allows for much
faster lookups and scales linearly with the number of packages.
The old way scaled as the product of the number of pkgsrc entries
and the total number of binary packages. Not a pretty value.
This makes the actual README.html generation part run about 3x faster.
Approach suggested by soda.
To generate a diff of this commit:
cvs rdiff -r1.16 -r1.17 pkgsrc/mk/scripts/genreadme.awk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.