Gentoo Archives: gentoo-portage-dev

From: Matt Turner <mattst88@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Pin-yen Lin <treapking@××××××××.org>
Subject: Re: [gentoo-portage-dev] [PATCH 2/2] Add caching to _slot_operator_check_reverse_dependencies
Date: Fri, 25 Nov 2022 17:09:26
Message-Id: CAEdQ38EH3+NwaZe5TBSaHVnUG8UdaSYFcE-5xqPAGEFG7aewPA@mail.gmail.com
In Reply to: [gentoo-portage-dev] [PATCH 2/2] Add caching to _slot_operator_check_reverse_dependencies by Pin-yen Lin
1 On Thu, Nov 24, 2022 at 10:36 PM Pin-yen Lin <treapking@××××××××.org> wrote:
2 >
3 > Add lru_cache to speed up the running time of "Calculating
4 > dependencies".
5 >
6 > In a ChromeOS use case, this patch decreases the running time from
7 > 311s to 197s with almost no memory usage increase.
8 >
9 > Signed-off-by: Pin-yen Lin <treapking@××××××××.org>
10
11 Thank you!
12
13 With recent subslot rebuilds (icu, boost, poppler), I measure an
14 improvement of 19%!
15
16 Benchmark 1: emerge @world -vuNDp
17 Time (mean ± σ): 42.668 s ± 0.555 s [User: 42.095 s, System: 0.315 s]
18 Range (min … max): 41.572 s … 43.342 s 10 runs
19
20 Benchmark 2: emerge @world -vuNDp
21 Time (mean ± σ): 35.991 s ± 0.154 s [User: 35.409 s, System: 0.332 s]
22 Range (min … max): 35.831 s … 36.306 s 10 runs
23
24 Summary
25 'emerge @world -vuNDp' ran
26 1.19 ± 0.02 times faster than 'emerge @world -vuNDp'