Greetings,
The following webrev contains fixes for the following issues:
8135 install plan creation could be faster for not yet installed packages
webrev:
http://cr.opensolaris.org/~swalker/pkg-8135/
Install plan creation could be faster for packages that no previously
installed version of is present with a few tweaks to how package plans
are created and the inventory function used to find and match packages.
The manifest.difference() function can eat up as much as seven or eight
seconds alone when performing a "pkg install -nv redistributable" into
an empty user image.
The unnecessary sorting of the entire catalog cache also slows things
down a few more seconds with the thousands of repeated calls to
image.inventory during plan creation.
This webrev changes manifest.difference() to detect when the origin
manifest is really an EmptyCachedManifest and return early with the
entire destination manifest's action set. This saves about 8% of the
total time needed for a pkg install -nv redistributable into an empty
user image on my system.
I am have also added an 'ordered' boolean parameter to image.inventory
to allow callers to determine whether matches should be sorted by
package name before being returned which saves a few more seconds for
the above case.
In total, these modifications (plus one more tweak for an unnecessary
expanddirs when no origin manifest is present) reduces the total time
for "pkg install -nv redistributable" on my system from 1m14s to 1m4s;
about a 13% or 10s reduction in total time.
There are further improvements that could be made, but this seemed like
a nice improvement for relatively little change.
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss