The NetBSD Project

CVS log for pkgsrc/pkgtools/pkg_install/files/add/perform.c

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg_install / files / add

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: pkgsrc-2020Q3


Revision 1.112 / (download) - annotate - [select for diffs], Wed Jul 1 10:03:19 2020 UTC (3 years, 9 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3
Changes since 1.111: +6 -6 lines
Diff to previous 1.111 (colored)

pkg_install: Fix and speed up "pkg_admin rebuild-tree".

In the pkg_admin front end, instead of adding +REQUIRED_BY entries as they
are found, which previously led to duplicate entries, cache the results and
write out the files at the end.

Underneath, add a caching version of iterate_pkg_db() that avoids the same
pkgdb directory lookup for every installed package, but is only suitable for
reads.  Also add a cache for best_match lookups to avoid expensive matches
each time.

For all caches, use a simple hashing function to improve lookup performance.

In summary, as well as fixing +REQUIRED_BY files, these patches reduce the
wall/user/system time of "pkg_admin rebuild-tree" on a system with 12,762
packages installed down from 13m52s/11m20s/2m32s to just 1m4s/1m3s/0m1s.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>