-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
🐛 Quickfix slows down saving files in VSCode #229
Comments
Do you have other extensions that run actions on save ? - If so, could try disabling them and try again to make sure that the Biome extension is the one causing the delay. |
I disabled everything except biome and it was still happening. PS: hmmm.. Interesting, when everything is disabled, it's still happening, sorry! How's that possible? That configuration should be biome specific? |
What I meant is when you save a file, VS Code will run all "on save" actions, and sometimes other extensions register their own actions which can have an impact. I see you mentioned using the insiders version of VS Code. Does that also happen in the stable version ? Also, if you're able to, a link to a reproduction repo would help troubleshooting. |
There appears to be a decent repro in this issue: #214 Link: https://github.com/OliverJAsh/biome-vscode-quickfix-import-issue/compare/1.7.3 I've also experienced this in Zod. You can pull down this branch to repro: https://github.com/colinhacks/zod/tree/slow-quickfix
I've introduced a formatting issue at the top of |
@nhedger i am experiencing the same issue in .vue files, quick save is very slow (3 second delay) when i have those settings "editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
}, in extension host output i also see those messages disabling the vue extension or removing those settings makes saving very fast again |
Interesting, I'll definitely have a look, thanks for the details. |
I believe I'm experiencing the same thing. Something feels slow, but I have to mention that biome is very new for me still |
I'm experiencing the same thing in:
I set this setting in my vscode and apparently it works perfect, no lag: "editor.codeActionsOnSave": {
// "quickfix.biome": "explicit",
"source.fixAll.biome": "explicit",
"source.organizeImports.biome": "explicit"
}, Another thing I noticed is that the |
I'm not sure I have understood the difference between these settings, and I can't find clarity in the docs. |
doesn't seem to work (atleast not in vue projects w/vue extension) with same warning in my previous comment |
I wasn't able to reproduce using the previously provided reproductions. For those experiencing the same issue right now, please provide a minimal reproduction that triggers it. |
https://github.com/leotroche/biome-repro-1726568917139
After saving The bug is present regardless of the Important: |
I have investigated this problem. I hope it is useful. reproduction repository: https://github.com/mizdra/quickfix-biome-slow Reproduction Test: Part 1Apparently, the problem reproduces without any 3rd-party extensions. Surprisingly, it reproduces without biome-vscode. The workspace used for reproduction is as follows:
{
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
}
}
function fn(){
console.log('hello');
} 2024-09-18.0.10.20.movThis suggests that the problem is caused by something other than the biome-vscode. Reproduction Test: Part 2The problem does not seem to reproduce with The workspace used for reproduction is as follows:
{
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
}
}
.foo {
background: black;
} 2024-09-18.0.15.42.movThis suggests that the problem is Reproduction Test: Part 3If you disable VS Code's built-in js/ts extension, the problem does not reproduce. How to disable VS Code's built-in js/ts extension:
2024-09-18.0.22.29.movFrom these tests, I believe the problem is caused by VS Code, VS Code's built-in js/ts extension ( I don't think biome-vscode has anything to do with this problem. |
I confirm the contribution of @mizdra
{
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
} The problem is still present only in |
I have investigated this issue further. It appears to be a compatibility issue between However, I think I need to know about the |
Really appreciate the investigation @mizdra, I'll be following along! |
it's worth noting that this issue also happens not only with Also from my experiments , replacing |
@ragrag You are misunderstanding the problem. This problem is specific to
|
@mizdra what i'm trying to say is that i can confirm that the problem is still reproducible in my case when enabling also disabling |
@ragrag Really? I couldn't reproduce it. 2024-09-22.23.37.24-1.mov2024-09-22.23.37.24-2.movrepo: https://github.com/mizdra/vue-quickfix-biome-test Have you forgotten to restart VS Code? Even if you press the button to disable the extension, the extension will continue to activate until you restart VS Code. To completely disable the extension, you must restart VS Code. |
Yeah i did. I can reproduce this consistently on multiple medium-sized vue apps residing in a medium sized monorepo. I can't seem to reproduce it on fresh vue apps so it's hard for me to isolate it and create a minimal repro but i will try when i have some time later I will atleast try to create a screen capture for demonstration maybe that will help? |
Hmm. That's strange.
Yes, it would be helpful if you could create a reproduction. :) I added my reproduction to #229 (comment). |
I have this same problem with the quickfix. It appears to me that it is waiting for the typescript check to complete before running. The longer the type checking takes the longer the delay appears to be before it saves the file. |
I have the same problem, but it seems that |
I have no problems with Organize imports only sorts and "organizes" the imports, it does not remove unused imports. That is the biggest reason we did want to use the quickfix setting. To remove unused imports. The |
biome 1.9.2 fixed |
Users should start adding the If the client (VSCode, Zed, etc.) sends the correct payload, Biome LSP should apply the changes. |
is there a guide on how to debug this issue or introspect biome trace logs? i can reproduce it in a private monorepo but only when opening the full workspace in vscode, |
VS Code version
1.90.0-insiders
Extension version
2.2.3
Biome version
1.7.3
Operating system
Description
When this config is enabled in vscode settings
it slows down saving files in vscode. But not always 😅. When i type something and immediately hit
Cmd + Save
, there's like a second delay before the file is saved.Interestingly enough, if i type something and wait a second and hit save, the file is saved immediately.
Steps to reproduce
"quickfix.biome": "explicit"
,Expected behavior
It should save immediately
Does this issue occur when using the CLI directly?
Not sure / Not applicable
Logs
Logs contain actions that happened when i entered "Enter" and immediately save
The text was updated successfully, but these errors were encountered: