Navigation Menu

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

Revert "nix-gitignore: Optimise performance" #107715

Merged
merged 1 commit into from Jan 3, 2021

Conversation

kevincox
Copy link
Contributor

@kevincox kevincox commented Dec 27, 2020

Reverts #106172

This commit reverts ef3ed45

This change causes issues with negative patterns. Reverting now until those can be resolved.

@SuperSandro2000
Copy link
Member

Please add back the mention of the reverted commit to the commit message:

This commit reverts ef3ed45c1240197b721f38a01ec48e7dc6e7c179

@kevincox
Copy link
Contributor Author

kevincox commented Jan 3, 2021

Good point, I assumed that GitHub would do that for me.

@kevincox kevincox merged commit bfa497b into master Jan 3, 2021
@kevincox kevincox deleted the revert-106172-nix-gitignore-perf branch January 3, 2021 13:01
@adisbladis
Copy link
Member

This wasn't "just a performance optimisation", it made nix-gitignore actually usable on non-toy repos.
Without these changes memory & CPU usage is simply so bad that nix-gitignore is unusable.

@kevincox
Copy link
Contributor Author

kevincox commented Jan 4, 2021

See #106172 (comment) for an example of a behaviour change. It appears that negative patterns were not working correctly.

Is breaking negative patterns fundamental to the performance improvement? If so maybe the new functions should be added under a new name? If not then a fix that preserves support for negative patterns is very welcome.

@symphorien
Copy link
Member

If the optimized code cannot be fixed to take negative patterns into account it is still possible to do as follows

  • if there are any negative patterns
  • then use the old slow code
  • else use the new shiny code

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

Successfully merging this pull request may close these issues.

None yet

6 participants