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

Very slow on long lists #176

Closed
nijel opened this issue Nov 19, 2020 · 2 comments · Fixed by #210
Closed

Very slow on long lists #176

nijel opened this issue Nov 19, 2020 · 2 comments · Fixed by #210
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@nijel
Copy link

nijel commented Nov 19, 2020

It takes ages to check a file with very long statement (for example https://github.com/WeblateOrg/language-data/blob/master/weblate_language_data/check_languages.py takes minute and half to check).

The problem seems to be in:

https://github.com/sobolevn/flake8-eradicate/blob/a9866301eb145be5b2f17ae58532b549d97c53a0/flake8_eradicate.py#L126-L129

The _tokens accumulate until the statement parsing is complete and flake8-eradicate checks all the tokens in the list for every line.

@sobolevn
Copy link
Member

@nijel PRs are welcome! I would love to release a version with the fix.

@sobolevn sobolevn added enhancement New feature or request help wanted Extra attention is needed labels Nov 19, 2020
@nijel
Copy link
Author

nijel commented Nov 19, 2020

Unfortunately, my knowledge of flake8 plugins is exactly zero, otherwise the PR would be already there...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants