Actions:
|
2024-02-03 16:49 AEST by Arthur Barrett - Git has implemented a 'file system watcher' to speed up status, commit and add operations.
Should we implement this for CVS too?
Should we implement this instead in CVS4S?
"With this config setting, Git commands that want to refresh Git’s index will query the built-in file system
watcher (“FSMonitor”) which files have been changed, and only look at those. When there are tens of
thousands of files in the worktree, this makes a difference because Git would otherwise have to look at the
lastModified times of all files (“full scan”) to figure out which ones were modified since Git looked last. If the
FSMonitor is not yet running, it is automatically started, and subsequent Git commands will benefit from it."
"Over sixteen years ago, when Git was invented to replace the version control system used by the Linux
kernel project, the fastest way to determine which worktree files were modified vs which ones were
unchanged was to use Linux’ ultra-fast lstat() call, essentially to compare the lastModified times to the ones
recorded in Git’s index (and also taking the lastModified time of the Git index itself into account)."
"This worked pretty well, even for the source code of the Linux kernel project (which consisted of a little over
17k files at the time)."
"Today, many projects in the software industry have worktrees containing many, many more files. Combined
with the different performance characteristics of NTFS, refreshing the index in such worktrees can take
minutes!" |