[detect_host_arch] Cache HostArch() function
From my recent go/gclient-sync-no-ops analysis, I noticed that HostArch() is repeated called within get_builtin_vars() fn. The `platform.architecture()` call made in arm-based systems and some x64 is expensive and adds to gclient sync's runtime when repeatedly called. When caching HostArch(), I noticed 22.4% speed-up in incremental no-op gclient sync when run on arm-based machine. Change-Id: I962c4fb0879d2931268f5bec1678ef782c56e7f2 Bug: 5076224 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5076226 Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>changes/26/5076226/3
parent
8bd4d87e35
commit
8197d724a6
Loading…
Reference in New Issue