Skip to content

Improve performance of fscache #1926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)

die_path_inside_submodule(&the_index, &pathspec);

enable_fscache(1);
enable_fscache(0);
/* We do not really re-read the index but update the up-to-date flags */
preload_index(&the_index, &pathspec);

Expand Down
4 changes: 2 additions & 2 deletions builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ static int checkout_paths(const struct checkout_opts *opts,
state.istate = &the_index;

enable_delayed_checkout(&state);
enable_fscache(1);
enable_fscache(active_nr);
for (pos = 0; pos < active_nr; pos++) {
struct cache_entry *ce = active_cache[pos];
if (ce->ce_flags & CE_MATCHED) {
Expand All @@ -375,7 +375,7 @@ static int checkout_paths(const struct checkout_opts *opts,
pos = skip_same_name(ce, pos) - 1;
}
}
enable_fscache(0);
disable_fscache();
errs |= finish_delayed_checkout(&state);

if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
Expand Down
4 changes: 2 additions & 2 deletions builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
PATHSPEC_PREFER_FULL,
prefix, argv);

enable_fscache(1);
enable_fscache(0);
read_cache_preload(&s.pathspec);
refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, &s.pathspec, NULL, NULL);

Expand Down Expand Up @@ -1410,7 +1410,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
s.prefix = prefix;

wt_status_print(&s);
enable_fscache(0);
disable_fscache();
return 0;
}

Expand Down
Loading