Skip to content
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

Disregard skip options for streamed files #2002

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashbreeze
Copy link

skip_gitignore is kinda slow, but it's much faster than having to process all files in the repo. At least when I'm processing multiple files at once.

During daily development, I use the vscode "Sort Imports" feature, which internally streams the contents of the file to isort. In this case, it is unbearably slow:

$ time echo 123 | isort - --filename=/code/foobar.py
123

real    0m0.195s
user    0m0.089s
sys     0m0.025s

$ time echo 123 | isort - --filename=/code/foobar.py --gitignore
123

real    0m7.326s
user    0m3.382s
sys     0m1.737s

That's 37 times slower.

If we're streaming in data, it probably makes sense to just disregard all skip conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant