Re: [gentoo-portage-dev] [PATCH] Add caching to use_reduce, vercmp, and catpkgsplit

2020-07-13 Thread Ulrich Mueller
> On Mon, 13 Jul 2020, Chun-Yu Shei wrote: > Ah, I wasn't aware that I should have added that... I'm happy to say > "Signed-off-by: Chun-Yu Shei " somewhere if > necessary. Should be enough to say it here, because this mailing list is archived. We could of course add an empty commit with

Re: [gentoo-portage-dev] [PATCH] Add caching to use_reduce, vercmp, and catpkgsplit

2020-07-13 Thread Chun-Yu Shei
Ah, I wasn't aware that I should have added that... I'm happy to say "Signed-off-by: Chun-Yu Shei " somewhere if necessary. The patch has gone through Google's open source patching approval process and I'm able to agree to any CLA required. On Mon, Jul 13, 2020 at 11:54 AM Ulrich Mueller wrote:

Re: [gentoo-portage-dev] [PATCH] Add caching to use_reduce, vercmp, and catpkgsplit

2020-07-13 Thread Ulrich Mueller
> On Mon, 13 Jul 2020, Zac Medico wrote: > Merged: > https://gitweb.gentoo.org/proj/portage.git/commit/?id=d9ee5b09664ab2255b62c1d52d554721ef8b716a Looks like the author's copyright signoff is missing? signature.asc Description: PGP signature

Re: [gentoo-portage-dev] [PATCH] Add caching to use_reduce, vercmp, and catpkgsplit

2020-07-13 Thread Zac Medico
On 7/12/20 11:30 PM, Chun-Yu Shei wrote: > Each of these functions is called repeatedly with the same arguments > many times. Cache sizes were selected to minimize memory use increase, > while still providing about the same speedup compared to a cache with > unbounded size. "emerge -uDvpU

[gentoo-portage-dev] [PATCH] Add caching to use_reduce, vercmp, and catpkgsplit

2020-07-13 Thread Chun-Yu Shei
Each of these functions is called repeatedly with the same arguments many times. Cache sizes were selected to minimize memory use increase, while still providing about the same speedup compared to a cache with unbounded size. "emerge -uDvpU --with-bdeps=y @world" runtime decreases from 44.32s ->

Re: [gentoo-portage-dev] [PATCH] Add caching to use_reduce,

2020-07-13 Thread Chun-Yu Shei
Sounds good, here's an updated patch that uses frozenset instead. I also moved the lru_cache imports up with the other system imports and renamed use_reduce_cached to _use_reduce_cached to fit with the existing convention. Memory usage and performance are essentially unchanged due to the tuple