Files
git/builtin
Jeff Hostetler 7cb59decda add: use preload-index and fscache for performance
Teach "add" to use preload-index and fscache features
to improve performance on very large repositories.

During an "add", a call is made to run_diff_files()
which calls check_remove() for each index-entry.  This
calls lstat().  On Windows, the fscache code intercepts
the lstat() calls and builds a private cache using the
FindFirst/FindNext routines, which are much faster.

Somewhat independent of this, is the preload-index code
which distributes some of the start-up costs across
multiple threads.

We need to keep the call to read_cache() before parsing the
pathspecs (and hence cannot use the pathspecs to limit any preload)
because parse_pathspec() is using the index to determine whether a
pathspec is, in fact, in a submodule. If we would not read the index
first, parse_pathspec() would not error out on a path that is inside
a submodule, and t7400-submodule-basic.sh would fail with

	not ok 47 - do not add files from a submodule

We still want the nice preload performance boost, though, so we simply
call read_cache_preload(&pathspecs) after parsing the pathspecs.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-05-22 15:15:40 +02:00
..
2020-07-30 19:18:06 -07:00
2021-02-25 16:43:29 -08:00
2021-04-20 11:09:50 -07:00
2020-08-11 18:04:11 -07:00
2021-05-07 12:47:41 +09:00
2021-04-27 16:31:39 +09:00
2021-01-06 15:10:49 -08:00
2020-10-16 12:30:45 -07:00
2021-02-25 16:43:30 -08:00
2021-02-25 16:43:30 -08:00
2021-02-25 16:43:30 -08:00
2021-04-27 16:31:39 +09:00
2021-05-16 21:05:22 +09:00
2021-05-07 12:47:41 +09:00
2021-04-07 16:54:08 -07:00
2021-04-30 13:50:26 +09:00
2021-05-20 08:54:59 +09:00
2021-04-07 16:54:08 -07:00
2021-04-14 13:47:21 -07:00
2021-03-13 16:00:09 -08:00
2020-05-13 12:19:18 -07:00
2021-02-25 16:43:33 -08:00
2021-04-07 16:54:08 -07:00
2020-07-30 19:18:06 -07:00
2021-05-07 12:47:41 +09:00
2021-01-25 14:19:19 -08:00
2021-04-20 11:09:50 -07:00
2020-07-30 19:18:06 -07:00
2020-08-11 18:04:11 -07:00
2021-05-20 08:54:59 +09:00