git-meta icon indicating copy to clipboard operation
git-meta copied to clipboard

`git meta close .` is slow

Open abliss opened this issue 7 years ago • 1 comments

It appears to be crawling all submodules to look for ones to close, rather than examining only the ones that are known to be open.

abliss avatar Jun 11 '18 20:06 abliss

How slow? I see about a 400-500ms difference (in a repo with about 8,000 submodules) between git meta close . and git meta close a-submodule-path.

It definitely doesn't crawl the tree though; it uses the same logic to deduce matching paths as open, which works even for sparse submodules (not on disk). I suspect what does account for the extra time is an inefficiency in the way it looks for matching paths -- it should do so against the open set rather than against the entire set (that it currently pares down later against the open set).

bpeabody avatar Jun 11 '18 20:06 bpeabody