From 1c1204a739b05d25a3fe60eb105d3b9082fb73a8 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Mon, 3 Aug 2020 23:20:53 +0200 Subject: [PATCH] Improve wafcache process pre-allocation --- waflib/extras/wafcache.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/waflib/extras/wafcache.py b/waflib/extras/wafcache.py index 8b9567fa..f267edd3 100644 --- a/waflib/extras/wafcache.py +++ b/waflib/extras/wafcache.py @@ -233,8 +233,9 @@ def build(bld): # already called once return - for x in range(bld.jobs): - process_pool.append(get_process()) + # pre-allocation + processes = [get_process() for x in range(bld.jobs)] + process_pool.extend(processes) Task.Task.can_retrieve_cache = can_retrieve_cache Task.Task.put_files_cache = put_files_cache