You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current support for .gitignore files is a hack that relies on git2::Repository::status_should_ignore(). It's unnecessarily slow to call that for every file in target/ when the .gitignore file contains /target/ -- we should be able to look at the directory and skip all of it.
We may want to fix this by parsing .gitignore files ourselves.
The text was updated successfully, but these errors were encountered:
This is to address issue #8. I haven't added the optimization to avoid
walking all the files in `target/` yet. Even so, this patch still
speeds up `jj st` in this repo, with ~13k files in `target/`, from
~320 ms to ~100 ms (-5.1dB). The time actually checking if paths match
gitignores seems to go down from 116 ms to 6 ms. I think that's mostly
because libgit2 has to look for `.gitignore` files in every parent
directory every time we ask it about a file, while the rewritten code
looks for a `.gitignore` file only when visiting a new directory.
This makes the workging copy walk skip an entire ignored directory if
there are no negative patterns later in the ignore file. That speeds
up `jj st` in this repo with ~13k files in `target/` from ~100 ms to
~25 ms (6.0dB). This closes issue #8.
The current support for
.gitignore
files is a hack that relies ongit2::Repository::status_should_ignore()
. It's unnecessarily slow to call that for every file intarget/
when the.gitignore
file contains/target/
-- we should be able to look at the directory and skip all of it.We may want to fix this by parsing
.gitignore
files ourselves.The text was updated successfully, but these errors were encountered: