summaryrefslogtreecommitdiff
path: root/t/t6019-rev-list-ancestry-path.sh
diff options
context:
space:
mode:
authorLibravatar Jeff Hostetler <jeffhost@microsoft.com>2022-03-25 18:03:12 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-25 16:04:17 -0700
commit26b9f34ab32b66a6387dc5ab3c773d3d4cd86685 (patch)
treee3ddbec77f7613d8222cf1fc53f9d9f577524b4e /t/t6019-rev-list-ancestry-path.sh
parentfsmonitor--daemon: use a cookie file to sync with file system (diff)
downloadtgif-26b9f34ab32b66a6387dc5ab3c773d3d4cd86685.tar.xz
fsmonitor: force update index after large responses
Measure the time taken to apply the FSMonitor query result to the index and the untracked-cache. Set the `FSMONITOR_CHANGED` bit on `istate->cache_changed` when FSMonitor returns a very large repsonse to ensure that the index is written to disk. Normally, when the FSMonitor response includes a tracked file, the index is always updated. Similarly, the index might be updated when the response alters the untracked-cache (when enabled). However, in cases where neither of those cause the index to be considered changed, the FSMonitor response is wasted. Subsequent Git commands will make requests with the same token and receive the same response. If that response is very large, performance may suffer. It would be more efficient to force update the index now (and the token in the index extension) in order to reduce the size of the response received by future commands. This was observed on Windows after a large checkout. On Windows, the kernel emits events for the files that are changed as they are changed. However, it might delay events for the containing directories until the system is more idle (or someone scans the directory (so it seems)). The first status following a checkout would get the list of files. The subsequent status commands would get the list of directories as the events trickled out. But they would never catch up because the token was not advanced because the index wasn't updated. This list of directories caused `wt_status_collect_untracked()` to unnecessarily spend time actually scanning them during each command. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6019-rev-list-ancestry-path.sh')
0 files changed, 0 insertions, 0 deletions