Re: [gentoo-portage-dev] [PATCH 1/3] Add caching to catpkgsplit function

2020-06-28 Thread Sid Spry
On Sat, Jun 27, 2020, at 1:34 AM, Chun-Yu Shei wrote: > According to cProfile, catpkgsplit is called up to 1-5.5 million times > during "emerge -uDvpU --with-bdeps=y @world". Adding a dict to cache its > results reduces the time for this command from 43.53 -> 41.53 seconds -- > a 4.8% speedup. >

[gentoo-portage-dev] Re: [PATCH] ecompress: optimize docompress -x precompressed comparison

2020-06-28 Thread Zac Medico
On 6/28/20 12:54 PM, Zac Medico wrote: > + LC_COLLATE=C sort -zu "${T}/.ecompress_skip_files" > > "${T}/.ecompress_skip_files_sorted"|| die > + LC_COLLATE=C sort -zu > "${T}/.ecompress_had_precompressed" > > "${T}/.ecompress_had_precompressed_sorted" ||

[gentoo-portage-dev] [PATCH] ecompress: optimize docompress -x precompressed comparison

2020-06-28 Thread Zac Medico
Use sort and comm with temporary files in order to compare lists of docompress -x and precompressed files, since the file lists can be extremely large. Also strip ${D%/} from paths in order to reduce length. Bug: https://bugs.gentoo.org/721516 Suggested-by: Robin H. Johnson Signed-off-by: Zac