-
Notifications
You must be signed in to change notification settings - Fork 59
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
Extremely Slow Formatting #63
Comments
Hmm, from looking at https://github.com/ziglang/vscode-zig/blob/master/src/zigFormat.ts it seems we don't use buffered IO and it is piped through stdin to JS and then written. Would it be possible to have Zig write to the files when it knows that the current open file is an actual file (not a scratch pad) and in the other cases use stdin? |
I have never experienced any slowness on Linux even when formatting 26k+ line files. Are you sure you have the extension configured to use a release build of Zig? Have you tried using zls as the formatting provider? |
Hello, I have tried disabling all of the pertinent extensions all extensions except the Zig one and the problem still persists. I am not sure how to use zls as the formatting provider because when I do 2022-06-30_07-09-24.mp4. |
This is no longer happening for me. Thanks |
still very slow on windows.
|
Hello, I have files that are not even over 200 lines which format almost instantly when running
zig fmt ..
but with this extension VS Code hangs for at least 3 seconds every time. I'm not sure what is causing this but it is consistently slow on my machine despite the CLI having performant results. I am on WindowsThe text was updated successfully, but these errors were encountered: