[email protected] wrote:
On Fri, Oct 23, 2009 at 03:40:32PM -0500, Shawn Walker wrote:
So much for third time being the charm (but this changeset is 128 lines).
new webrev (as a difference against pkg-cat-p3-3):
http://cr.opensolaris.org/~swalker/pkg-cat-p3-4/
In general, this looks good. I appreciate you adding
get_entry_signatures(), but I found a nit with the implementation.
In particular, if you change the inner part of the iteritems() loop to
the following, the code runs more than 5x faster on a list with only a
few items matching "signature-":
if k.startswith("signature-"):
sig = k.split("signature-")[1]
yield sig, v
Apparently, it's expensive to raise/catch all of those exceptions.
I was debating that when I wrote it.
I guess asking for forgiveness may be easier than asking for permission,
but apparently asking for permission first is a lot faster :P
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss