biome: š high memory usage
VS Code version
1.101.2
Extension version
3.0.3
Biome version
2.0.5
Operating system
- Windows
- macOS
- Linux
Description
over 1500 mb memory usage, even when i donāt use
Steps to reproduce
Use biome as default formatter
Expected behavior
biome shouldnāt use high memory
Does this issue occur when using the CLI directly?
Not sure / Not applicable
Link to a minimal reproduction
No response
Logs
CLI:
Version: 2.0.5
Color support: true
Platform:
CPU Architecture: x86_64
OS: windows
Environment:
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_CONFIG_PATH: unset
BIOME_THREADS: unset
NO_COLOR: unset
TERM: unset
JS_RUNTIME_VERSION: v22.16.0
JS_RUNTIME_NAME: node
NODE_PACKAGE_MANAGER: pnpm/10.12.1
Biome Configuration:
Status: Loaded successfully
Path: biome.json
Formatter enabled: true
Linter enabled: true
Assist enabled: true
VCS enabled: true
Workspace:
Open Documents: 0
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 15
- Comments: 21 (5 by maintainers)
Iām seeing the same thing on mac
Title: Biome uses high CPU and memory after running
pnpm run devEnvironment:
Issue: When I open VS Code (cold start), Biome uses around 18 MB RAM with no dev server running. After running
pnpm run dev, memory usage quickly jumps to 500ā1000 MB, and when I open the browser to view the app, CPU usage goes to 100% and RAM usage increases to 8+ GB.What I tried:
biome.jsonconfig to just{}ā no effect.linter.domains.project, even without running the dev server, Biome starts using 100% CPU and high RAM just from VS Code being open.Expected behavior: Biome should work efficiently and not cause heavy CPU or RAM usage during normal development. It should not slow down the system just because a project is open or the dev server is running.
Possible cause: Biome might be scanning or analyzing too many files when the project is active.
@ematipico I havenāt observed high memory usage, but rather a hanging process and high cpu usage. The preview release fixes it for me. Not sure if https://github.com/biomejs/biome/issues/6792 is related though.
Fixes the problem
Just for reference, Iām using Linux (Ubuntu) and the same happens after I updated to biome 2.x. So itās probably not OS specific. Weāre using yarn. Just by having VSCode open, biome keeps consuming more and more RAM (40GB+) until thereās no free RAM anymore, slowing down the system.
Setting
linter.domains.projecttononedidnāt seem to have any effect, RAM usage still kept growing rapidly.The memory map isnāt particular useful either, it just has a single very large section:
Iām using an NX monorepo. After disabling
noImportCycles, memory usage dropped from 1GB to under 100MB, so Iāve kept it off for now. This rule seems to need performance improvements.The issue is that when I open a project, Biome scans through the entire directory, including node_modules. Therefore, I need to provide the following configuration in all projects, even those where Iām not using Biome:
Can someone test the following release? Let me know if it fixes the problem, please?
in my case vscode biome is leaking memory and running with high CPU