Re: [PATCH 2/2] Add caching to _slot_operator_check_reverse_dependencies
Matt Turner <[email protected]> Fri, 25 Nov 2022 12:08:52 -0500
| Newsgroups | gmane.linux.gentoo.portage.devel |
|---|---|
| Message-ID | <CAEdQ38EH3+NwaZe5TBSaHVnUG8UdaSYFcE-5xqPAGEFG7aewPA@mail.gmail.com> |
On Thu, Nov 24, 2022 at 10:36 PM Pin-yen Lin <[email protected]> wrote= : > > Add lru_cache to speed up the running time of "Calculating > dependencies". > > In a ChromeOS use case, this patch decreases the running time from > 311s to 197s with almost no memory usage increase. > > Signed-off-by: Pin-yen Lin <[email protected]> Thank you! With recent subslot rebuilds (icu, boost, poppler), I measure an improvement of 19%! Benchmark 1: emerge @world -vuNDp Time (mean =C2=B1 =CF=83): 42.668 s =C2=B1 0.555 s [User: 42.095 = s, System: 0.315 s] Range (min =E2=80=A6 max): 41.572 s =E2=80=A6 43.342 s 10 runs Benchmark 2: emerge @world -vuNDp Time (mean =C2=B1 =CF=83): 35.991 s =C2=B1 0.154 s [User: 35.409 = s, System: 0.332 s] Range (min =E2=80=A6 max): 35.831 s =E2=80=A6 36.306 s 10 runs Summary 'emerge @world -vuNDp' ran 1.19 =C2=B1 0.02 times faster than 'emerge @world -vuNDp'