imageplan.py:
nit: can remove sys and time imports I think
manifest.py:
This code looks very client/image centric in that it sets an image as a
class variable, but I don't actually see anyplace where it has to be.
The only places I think we make use of the fact that we have an image is
in constructing the CachedManifest where we pass it into the Manifest
constructor, and for getting the path for the fmri's manifest. For the
first, as far as I can tell, we never actually use the image object that
we set in the Manifest object (at least we're not using it in the code
in manifest.py). For the second, could we just pass a function in which
translates a fmri to a manifest path/directory? That would remove the
client specific nature of the code. Maybe this won't have a clear use on
the server, but I don't see a reason to tie the functionality to the
client alone without a reason.
finiload = file initialization load? file initial load?
nit: 560, 562,565,575: 4 space indent
nit: 665: no space before colon
image.py
772-813: I think this code could be reorganized to be easier to
understand. Maybe something like:
while retry count > 0:
try:
<grab manifest>
return m
except <blah>:
<add to failures>
retry count -= 1
raise failures
But maybe that just looks better to me. I did a couple of takes on the
existing code before I really groked it.
line 910: can be removed right?
Looks great and the performance boost seems amazing.
Brock
Bart Smaalders wrote:
http://cr.opensolaris.org/~barts/CachedManifests/
Reduces working set by 2x on pkg install -nv,
50% reduction in time taken.
6904 image.installed_file_authority always tries to open installed
file r+
7455 Should not need to read entire manifest to examine dependencies
-= Bart
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss