summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorLibravatar Ben Peart <benpeart@microsoft.com>2018-10-10 11:59:36 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-10-11 15:32:48 +0900
commitabb4bb83845dc012ffe1c04750d1a09edd598a82 (patch)
treea87abd9f2b64c27cd807bb574e73cd017bc1642c /compat
parentconfig: add new index.threads config setting (diff)
downloadtgif-abb4bb83845dc012ffe1c04750d1a09edd598a82.tar.xz
read-cache: load cache extensions on a worker thread
This patch helps address the CPU cost of loading the index by loading the cache extensions on a worker thread in parallel with loading the cache entries. In some cases, loading the extensions takes longer than loading the cache entries so this patch utilizes the new EOIE to start the thread to load the extensions before loading all the cache entries in parallel. This is possible because the current extensions don't access the cache entries in the index_state structure so are OK that they don't all exist yet. The CACHE_EXT_TREE, CACHE_EXT_RESOLVE_UNDO, and CACHE_EXT_UNTRACKED extensions don't even get a pointer to the index so don't have access to the cache entries. CACHE_EXT_LINK only uses the index_state to initialize the split index. CACHE_EXT_FSMONITOR only uses the index_state to save the fsmonitor last update and dirty flags. I used p0002-read-cache.sh to generate some performance data: Test w/100,000 files reduced the time by 0.53% Test w/1,000,000 files reduced the time by 27.78% Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
0 files changed, 0 insertions, 0 deletions