Skip to content

Use alternative library to parse csharpier- and git-ignore files#1591

Merged
belav merged 3 commits intobelav:mainfrom
kevinboss:feature/rules-performance
Apr 27, 2025
Merged

Use alternative library to parse csharpier- and git-ignore files#1591
belav merged 3 commits intobelav:mainfrom
kevinboss:feature/rules-performance

Conversation

@kevinboss
Copy link
Copy Markdown

@kevinboss kevinboss commented Apr 25, 2025

Using gitignore parser library instead of building ignore rules ourselves improves csharpier performance drastically even with large repositories and a lot of ignore rules.

This would introduce a potentially breaking change as the rules are now case-sensitive by default since git is as well.

I had to remove one unit test as we would not parse the ignore-files ourselves anymore as well as alter one which was testing case-insensitive paths.

@kevinboss kevinboss marked this pull request as draft April 25, 2025 21:03
@kevinboss kevinboss force-pushed the feature/rules-performance branch from e3b2566 to 60304fe Compare April 25, 2025 21:11
@kevinboss kevinboss marked this pull request as ready for review April 25, 2025 21:12
@kevinboss kevinboss force-pushed the feature/rules-performance branch from 60304fe to f3e2979 Compare April 26, 2025 18:56
Copy link
Copy Markdown
Owner

@belav belav left a comment

Choose a reason for hiding this comment

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

Thanks for doing this work!

My quick performance test still showed times that aren't nearly as good as as 0.28.0 on my work repo, but I think there was something else that changed prior to 1.0.0.

I'm okay with the ignore files being case sensitive.

There are a couple of build failures around warnings + formatting, and one minor comment I have. Then this will be good to merge.

@kevinboss kevinboss force-pushed the feature/rules-performance branch from 9c383d5 to c37a94d Compare April 27, 2025 21:04
@kevinboss
Copy link
Copy Markdown
Author

@belav Should be done. I have some trouble getting your coding style rules to run in Rider so I rely on the CI builds to check formatting. It does look fine on my fork and I hope it does as well on the checks here.

Copy link
Copy Markdown
Owner

@belav belav left a comment

Choose a reason for hiding this comment

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

Looks good now, thanks again!

@belav belav merged commit da16a69 into belav:main Apr 27, 2025
5 checks passed
@kevinboss kevinboss deleted the feature/rules-performance branch April 28, 2025 06:35
belav added a commit that referenced this pull request May 9, 2025
… two different threads. (#1595)

Part of #1588, based on #1591 to help avoid any conflicts.

Initial POC shows that we don't redo the work anymore creating
`IgnoreFile`, but there are some bugs to address.
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.

2 participants