-
Notifications
You must be signed in to change notification settings - Fork 31
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 BUG: 0.1.0-next.3 is much slower than 0.0.12 - hangs vscode temporarily #162
Comments
Hi, thanks for opening this issue. We are aware of this problem. This happens due to the package |
Thanks for the quick reply! I had run into a transient error earlier in the upgrade using Thanks again! |
Is that b/c |
Thankfully it looks like prettier is working on transitioning to support esm: prettier/prettier#10157 (comment) |
https://github.com/prettier/prettier/pull/12343/files might be a good case study in how to write it 馃 |
Also tracked by prettier/prettier#4459 which would make the parser async? |
https://github.com/rx-ts/synckit suggested in prettier#4459 might be a faster solution in the meantime than |
Yes, that's correct.
Yeah, we are keeping an eye on those issues.
Thank you for the suggestions! |
I'm glad to see that synckit seems to dramatically improve things! |
Closing at this has been fixed in |
Describe the Bug
To be specific, in the examples below
next
is 0.1.0-next.3 andlatest
is 0.0.12.I'm currently converting a project from Astro 0.20 to Astro 0.25 and also upgrading prettier at the same time to the
next
version, and I'm running into an issue where formatting on save in VSCode noticeably hangs the editor for several seconds.On my project:
If I run the
yarn prettier -w .
several times in a row with thenext
version, they'll all be around 13 seconds, even though the subsequent runs wouldn't require writing any new changes.Steps to Reproduce
I tried reproducing this with entire folders from the example projects but unfortunately
latest
would often fail on files so it wasn't easy to show a complete comparison but for the projects below runningyarn prettier -w .
was noticeably slower onnext
:For a VSCode demonstration:
This will result in VSCode hanging for about 6-7 seconds every time I save.
Let me know if you need any details about my VSCode setup (though this is happening at the command line too of course).
The text was updated successfully, but these errors were encountered: