-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
🐛 slow linter on apply #1569
Comments
may related to #98 |
We're also seeing some speed issues with Also, |
It seems linter filesystem problem because the |
Are you able to give us more information using debug logging?
Try to restart the LSP server; that's possibly the reason. |
The issue is due to a performance bottleneck when we apply the code actions to big files. We haven't been able to allocate enough time to understand and fix this, unfortunately. |
The most notable thing I can see from the debug logging is that there's a bunch of
Our {
"$schema": "https://biomejs.dev/schemas/1.5.2/schema.json",
"files": {
"ignore": [
".vscode/**",
"android/**",
"ios/**",
"dist/**"
],
"ignoreUnknown": true
},
"formatter": {
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"organizeImports": {
"enabled": true
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"trailingComma": "es5"
}
},
"overrides": [
{
"include": ["apps/app/**"],
"linter": {
"rules": {
"suspicious": {
"noConsoleLog": "error"
},
"style": {
"useBlockStatements": "error"
}
}
}
},
{
"include": [
"apps/api/**",
"libs/data-aggregator/**"
],
"linter": {
"rules": {
"suspicious": {
"noConsoleLog": "off"
},
"complexity": {
"noForEach": "off"
}
}
}
}
]
} If we remove the
Ahh, of course it should use the local version first! This PR to update confused us. |
Seeing a potentially related problem on 1.5.3 with a large file in vscode. Direct reformatting requests are instant, but saves with import formatting take a few seconds. Test editor configured like this:
Biome configured like this Disabling import formatting with
…makes saves instant. I tried enabling logs for the extension, here's the relevant bit that made me think it's related to #1569 (comment) :
|
Biome as it is now didn't work out for us 😢 Summary for posterity: * it IS much, much faster, fast enough to skip any sort of caching * we couldn't fully replace Prettier just yet. We use Prettier programmatically to format code in docs, and Biome's JS interface is officially alpha and [had legacy peer deps set](biomejs/biome#1756) (which would fail our CI build as we don't allow installation warnings) * ternary formatting differs from Prettier, leading to a large diff biomejs/biome#1661 * import sorting differs from Prettier's `prettier-plugin-organize-imports`, making the diff even bigger * the deal breaker is a multi-second delay on saving large files (for us it's [Editor.ts](https://github.com/tldraw/tldraw/blob/main/packages/editor/src/lib/editor/Editor.ts)) in VSCode when import sorting is enabled. There is a seemingly relevant Biome issue where I posted a small summary of our findings: biomejs/biome#1569 (comment) Further actions: * reevaluate in a few months as Biome matures ### Change Type - [x] `internal` — Any other changes that don't affect the published package
This issue has been resolved for us in |
Environment information
What happened?
Expected result
the applying of the linter should be faster
Code of Conduct
The text was updated successfully, but these errors were encountered: