Re: [PATCH] returnLeafNodes () speedup s
James Antill <[email protected]>
| Newsgroups | gmane.linux.rpm.yum |
|---|---|
| Message-ID | <[email protected]> |
Ville Skyttä <[email protected]> writes: > Hello, > > The attached patch speeds up returnLeafNodes() by over 30% in my tests. Doing > returnPackages() only once doesn't gain much, but lazy fetching various lists > and avoiding concatenating them does a lot. While at it, changed some > has_key()'s to "foo in bar" (has_key is deprecated in favor of the latter). I tweaked it a bit to be a minimal patch (removal of has_key will probably be a giant patch at some point). Also used yield instead of getattr, anyway upstream now... -- James Antill -- [email protected]