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

Drastically speed up formatting when ignore or config file exist. #597

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

belav
Copy link
Owner

@belav belav commented Feb 7, 2022

closes #594

Copy link
Collaborator

@shocklateboy92 shocklateboy92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I not sure what the magic bit that caused the massive performance improvement is.
But I don't see any glaring code issues, so LGTM.

@belav
Copy link
Owner Author

belav commented Feb 8, 2022

Okay, I not sure what the magic bit that caused the massive performance improvement is. But I don't see any glaring code issues, so LGTM.

Creating the ignore file is somewhat slow. Before these changes I think it was creating the ignore file once per directory that contained .cs files. Or maybe even once per .cs file that was formatted..
Formatting csharpier-repos with an ignore file took an hour before these changes, vs I think ~7 minutes with these changes or no ignore file.

@belav belav merged commit a338a6c into master Feb 8, 2022
@belav belav deleted the ignore-speed branch February 8, 2022 17:20
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.

.csharpierignore causes csharpier to be significantly slower
2 participants