Nore’s FreeBSD Blog

Just another FreeBSD Committers Blogs weblog

Progress

without comments

Changes

These are the main things I’ve done so far some abstract and some more specific, if you want to check out the code you can get it from the perforce depot: //depot/projects/soc2008/andenore_pkginstall/

pkg_convert:

  • Added a convert program (pkg_convert) that indexes information to PKG_DBCACHE_FILE (defaults to $PKG_DBDIR/pkgcache.db)

pkg_info:

  • Improved performance for -W option using the dbcache
  • A quick profiling of pkg_info revealed that the default behavior for pkg_info was to call read_plist for each package even though not needed so I’ve added a check for this and it runs significantly faster.

pkg_add:

  • Indexes information to dbcache according to the add

pkg_delete:

  • “Deindexes” information according to the delete

lib:

  • Changed methods in match.c to use cache if available
  • Added global variable ‘database’ of type DB* (the database object)
  • Added database helper functions

I’ve done some quick profiling of pkg_version and it spends much of it’s time in read_plist too (just to fetch the origin). So I plan to index the origin of each package and speed this up in pkg_version.

Written by andenore

June 19th, 2008 at 12:59 pm

Posted in Uncategorized