[EMAIL PROTECTED] wrote:
> Folks,
> I finally have a fix for 3505. This reduces the amount of time we spend
> processing manifests and actions before and during the evaluate stage.
>
> In the performance tests that I ran, this took 10 seconds off the
> evaluate time, reduced user cpu time by 8-10 seconds correspondingly.
> It also reduced our wall-clock runtime by 20 seconds. The caching
> doesn't appear to have any negative impact upon the RSS of the pkg
> client.
>
> Webrev available here:
>
> http://cr.opensolaris.org/~johansen/webrev-3505/
Review Comments
===============
manifest.py:
line 97: is there any reason to not make this private? i.e.
__actions_bytype
I tried this out on my own system, and verified that operational intent
is still functioning as expected.
General Questions
=================
I've been wondering where the "if blah in foo" construct is faster or
slower than something like:
lst = None
try:
lst = self.actions_bytype[type]
except KeyError:
lst = self.actions_bytype[type] = []
or...
try:
self.actions_bytype[action.name].append(action)
except KeyError:
self.actions_bytype[action.name] = [action]
In the case that you had a lot of items, I could see the try/except
being faster since you wouldn't incur the lookup expense. In initial
attempts, I could see the exception overhead slowing things down.
Any thoughts?
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss