Danek Duvall wrote:
On Fri, May 15, 2009 at 06:21:44PM -0500, Shawn Walker wrote:

Danek Duvall wrote:
On Wed, May 13, 2009 at 05:19:58PM -0500, Shawn Walker wrote:
http://cr.opensolaris.org/~swalker/pkg-6342/
pull.py:

  - line 167: why CachedManifest?  Is this to speed up
    get_hashes_and_sizes()?
It seemed to be a general benefit to most of the operations, and it reduced memory usage quite a bit.

In particular, when performing a recursive retrieve of entire (which gives you about 1600 packages?) it reduced memory usage from around 800M to about 100M.

Okay, great.  Do the cache files get cleaned up?  I wouldn't want them
getting rsynced, say, into a repo, or generally getting carried along into
production somewhere.  That's the only downside I see.

I'm not certain how that would happen since if you receive the transaction raw, the result isn't designed to be rsync'd directly into a repository.

And if you received it directly to a repository, then the cache files only exist in temporary directory used to store the download before republishing.

However, I'm ok with changing cleanup() to discard all the manifest cache files. I thought about adding a flush() method (or other name, please suggest one if you can) to the CachedManifest class to do that. Thoughts?

  - line 397: I think it'd be useful to have a comment here saying that
    we don't bother cleaning up a partially copied file because it'll be
    overwritten on the next attempt.  Though I think it'd be better to
    clean up partially copied files because someone might not decide to
    retry, and then their repo wouldn't just be incomplete, it'd be
    broken.
I've changed it to remove the possibly, partially copied file.

Looks okay, though perhaps creating a temporary directory to put the
copies into, and then moving them into place would be a tad safer?

Sure.

Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to