msysgit/git — pull request #94 by kblees (2013-10-04 19:55:57+00:00)
Title: Improve git-status performance

This is v4 of my fscache branch. The fscache code can now be turned on/off via config option (default off), so it is now pretty safe to merge.

See previous discussions at:
- https://groups.google.com/d/topic/msysgit/fL_jykUmUNE/discussion
- Pull request #36
- Pull request #47

Changes since kb/fscache-v3 (#47):
- the new hashmap implementation (1st patch in v3) has been sent upstream
- fscache code (2nd patch in v3) has been split into several patches
- fscache can be turned on/off at runtime via 'git config core.fscache'
- if turned off, the original lstat and dirent implementations are used

Git for Windows installer with this PR applied:
https://docs.google.com/uc?id=0BxXUoUg2r8ftZ21mR2RyOG9NLWc&export=download

Here is git status performance on the WebKit repo (~200k files), best of 5 runs (i.e. hot cache):

| core. | --un | |
UAC | preload | tracked | core.fscache |
[1] | index | -files | off | on | gain
-----+---------+---------+--------+--------+------
yes | off | all | 10.327 | 1.841 | 5.6
yes | off | no | 8.939 | 1.404 | 6.4
yes | on | all | 3.853 | 0.998 | 3.9
yes | on | no | 2.449 | 0.671 | 3.6
no | off | all | 4.102 | 1.778 | 2.3
no | off | no | 2.699 | 1.404 | 1.9
no | on | all | 2.636 | 0.999 | 2.6
no | on | no | 1.232 | 0.671 | 1.8

[1] The UAC penalty hits on Vista/7 if the repository is located on the system drive and the luafv.sys driver is running.

The commit list looks a bit intimidating. However, only the last six patches are relevant for fscache (the msvc fixes have been merged to junio/next, hashmap is currently beeing discussed upstream, and the performance-tracing stuff is optional and the same as pull request #46).

Cheers,
Karsten