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

Look into implementing caching to speed up formatting. #692

Closed
belav opened this issue Jun 20, 2022 · 3 comments · Fixed by #707
Closed

Look into implementing caching to speed up formatting. #692

belav opened this issue Jun 20, 2022 · 3 comments · Fixed by #707
Labels
Milestone

Comments

@belav
Copy link
Owner

belav commented Jun 20, 2022

Prettier recently added caching to determine if formatting a file can be skipped. https://prettier.io/docs/en/cli.html#--cache

Look into what they are doing and determine if a similar feature can be added to csharpier.

@shocklateboy92
Copy link
Collaborator

Is that really necessary? I feel like csharpier is already bloody fast. 😛

@belav
Copy link
Owner Author

belav commented Jul 13, 2022

But what if we can make it super bloody fast?
It is ~22 seconds on our work main repo (13,000 files or so) without the syntax checker.
If caching can drop that down to like 5 seconds that would be awesome. I'd do a quick POC first to see if it makes sense to go through with it.

@belav belav added this to the 0.19.0 milestone Jul 18, 2022
@belav belav added type:enhancement New feature or request area:formatting labels Jul 18, 2022
@belav
Copy link
Owner Author

belav commented Jul 18, 2022

My initial POC using last modified date - the 13,000 file repo can be formatted in 3 seconds if caching is used and no files have changed. 10x improvement!

belav added a commit that referenced this issue Jul 18, 2022
closes #692
@belav belav closed this as completed in 9f9e0a5 Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants