diff options
author | Jameson Miller <jamill@microsoft.com> | 2017-09-18 13:24:33 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-19 12:28:06 +0900 |
commit | 5aaa7fd39aafb83fdb30a6af4685eda5fc1cd382 (patch) | |
tree | 093a4c243296a9610567045b0663fdb4862a5007 /git-compat-util.h | |
parent | RelNotes: further fixes for 2.14.2 from the master front (diff) | |
download | tgif-5aaa7fd39aafb83fdb30a6af4685eda5fc1cd382.tar.xz |
Improve performance of git status --ignored
Improve the performance of the directory listing logic when it wants to list
non-empty ignored directories. In order to show non-empty ignored directories,
the existing logic will recursively iterate through all contents of an ignored
directory. This change introduces the optimization to stop iterating through
the contents once it finds the first file. This can have a significant
improvement in 'git status --ignored' performance in repositories with a large
number of files in ignored directories.
For an example of the performance difference on an example repository with
196,000 files in 400 ignored directories:
| Command | Time (s) |
| -------------------------- | --------- |
| git status | 1.2 |
| git status --ignored (old) | 3.9 |
| git status --ignored (new) | 1.4 |
Signed-off-by: Jameson Miller <jamill@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
0 files changed, 0 insertions, 0 deletions