From d5035d3dbd96bee21a5e40812e6865d3ba20768d Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Tue, 26 Dec 2023 19:25:53 +0200 Subject: [PATCH] dynamic thread count in packager script for gen emu config --- tools/generate_emu_config/package_win.bat | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/generate_emu_config/package_win.bat b/tools/generate_emu_config/package_win.bat index 9c1d7499..4503fb40 100644 --- a/tools/generate_emu_config/package_win.bat +++ b/tools/generate_emu_config/package_win.bat @@ -11,9 +11,15 @@ set "out_dir=bin\package\win" set /a MEM_PERCENT=90 set /a DICT_SIZE_MB=384 -set /a THREAD_COUNT=13 set "packager=..\..\third-party\deps\win\7za\7za.exe" +:: use 70% +if defined NUMBER_OF_PROCESSORS ( + set /a THREAD_COUNT=NUMBER_OF_PROCESSORS*70/100 +) else ( + set /a THREAD_COUNT=2 +) + if not exist "%packager%" ( 1>&2 echo "[X] packager app wasn't found" set /a last_code=1