[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/
>
Nice fix; simple code improvements and substantial performance win.
188 def gen_actions_by_type(self, type):
189 """Generate actions in the manifest of type "type"."""
190
191 if type not in self.actions_bytype:
192 self.actions_bytype[type] = []
193
194 lst = self.actions_bytype[type]
195
196 return (a for a in lst)
This could also be written somewhat more compactly as:
def gen_actions_by_type(self, type):
"""Generate actions in the manifest of type "type"."""
return (a for a in self.actions_bytype.get(type,[]))
- Bart
--
Bart Smaalders Solaris Kernel Performance
[EMAIL PROTECTED] http://blogs.sun.com/barts
"You will contribute more with mercurial than with thunderbird."
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss