Message ID | pull.932.v9.git.1626268360.gitgitgadget@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | Sparse-index: integrate with status | expand |
On Wed, Jul 14, 2021 at 6:12 AM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote: > > This is the first "payoff" series in the sparse-index work. It makes 'git > status' very fast when a sparse-index is enabled on a repository with > cone-mode sparse-checkout (and a small populated set). > > This is based on ds/sparse-index-protections AND mt/add-rm-sparse-checkout. > The latter branch is needed because it changes the behavior of 'git add' > around sparse entries, which changes the expectations of a test added in > patch 1. > > The approach here is to audit the places where ensure_full_index() pops up > while doing normal commands with pathspecs within the sparse-checkout > definition. Each of these are checked and tested. In the end, the > sparse-index is integrated with these features: > > * git status > * FS Monitor index extension. > > The performance tests in p2000-sparse-operations.sh improve by 95% or more, > even when compared with the full-index cases, not just the sparse-index > cases that previously had extra overhead. > > Hopefully this is the first example of how ds/sparse-index-protections has > done the basic work to do these conversions safely, making them look easier > than they seemed when starting this adventure. > > Thanks, -Stolee > > > Update in V9 > ============ > > * Fixed typo. > > * All patches are marked as Reviewed-by Elijah. Thanks for the careful > review! Thanks for all the hard work and pushing this feature forward!
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes: > This is the first "payoff" series in the sparse-index work. It makes 'git > status' very fast when a sparse-index is enabled on a repository with > cone-mode sparse-checkout (and a small populated set). The first payoff turning out to be a long time coming ;-) > This is based on ds/sparse-index-protections AND mt/add-rm-sparse-checkout. > The latter branch is needed because it changes the behavior of 'git add' > around sparse entries, which changes the expectations of a test added in > patch 1. > > The approach here is to audit the places where ensure_full_index() pops up > while doing normal commands with pathspecs within the sparse-checkout > definition. Each of these are checked and tested. In the end, the > sparse-index is integrated with these features: > > * git status > * FS Monitor index extension. I said this alreayd but I think the approach makes sense. One related tangent that makes me wonder is if we can teach "ls-files" to help scriptors with a mode that does not pretend we have the full index (i.e. when asked to show sparse index state, "ls-files --sparse" would show the same output as "ls-files --stage" without expanding each tree entry in the index into its flattend list of paths). Thanks.
On Wed, Jul 14, 2021 at 1:37 PM Junio C Hamano <gitster@pobox.com> wrote: > > "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > This is the first "payoff" series in the sparse-index work. It makes 'git > > status' very fast when a sparse-index is enabled on a repository with > > cone-mode sparse-checkout (and a small populated set). > > The first payoff turning out to be a long time coming ;-) True, but much, much less time than it took between when I started the merge machinery overhaul and its first big payoffs. ;-)