On 03/15/10 05:44 PM, Danek Duvall wrote:
Shawn Walker wrote:

http://cr.opensolaris.org/~swalker/pkg-mem/

Could you add a note to the bug explaining the catalog change?  As far as I
can tell, it's just so that we don't store a catalog in-memory when calling
get_last_modified(), but it's not clear from the bug that it's unrelated to
the imageplan changes.  What's the runtime tradeoffs for re-loading the
catalog each time?

So the previous behaviour in this area was actually a bug. The __get_catalog method was intended to always bypass the normal caching mechanism so the callers like image.get_last_modified() could get the actual on-disk last modification date without affecting or using any cached information. The comment for the get_last_modified() states this already.

The change was related to the memory usage reduction in that it was causing any code that executed after a call to get_last_modified() to have to reload catalog data again when it didn't need to. I'll be happy to open a separate bug and add it to this changeset's commit comment if you'd like.

As for what's the runtime tradeoff? If you combine this patch with the one for bug 15087 and bug 12123, then the performance is actually better:

pkg install --no-index --no-refresh system/manual (download cached)
=================================================
b132 SPARC T5120: 1m40s -> 1m23s

pkg uninstall --no-index system/manual
======================================
b132 SPARC T5120: 35s -> 29s

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

Reply via email to