On 12/30/11 13:19, Shawn Walker wrote:
On 12/29/11 19:45, Brock Pytlik wrote:
Webrev:
https://cr.opensolaris.org/action/browse/pkg/bpytlik/performance
Bugs:
19104 CliTestCase.pkgsend needs to display traceback when pkgsend
tracesback
19113 old dictionary in imageplan.__find_all_conflicts should be seeded
using old_excludes
19119 generic.get_varcet_keys shouldn't use startswith
19120 Image shouldn't load the action dictionary twice during an update
19121 if actions.offsets includes number of lines with the same key,
things can be faster
19122 pkgplans should hold onto their manifests a bit longer
19123 maintaining a cache of created fmris while checking for
conflicting actions makes things faster
19124 conflicting actions should use sets of strings instead of PkgFmris
19125 pkg_solver should stop creating the same pfmris over and over
19126 manifests should track what's been excluded from them
19127 compiling re's in facets is faster than using fnmatch
[snip]
lines 1598-1599: I'm not sure how much of a difference it will make
here, but I've discovered in the past that setdefault() can be fairly
slow in a hot path. Instead, you may find this construct faster:
try:
old[key].append((act, pfmri))
except (KeyError, AttributeError):
old[key] = [(act, pfmri)]
It all depends on how many times the entry already exists. On SPARC
especially, this tends to be noticeably faster since we avoid an extra
function call. You use this construct in a few other places as well.
I tried this and it was a wash on x86 and a small bit slower on sparc,
so I'll stick w/ the set defaults.
Brock
[snip]
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss