How to fix Oxlint slowing down TypeScript in VS Code and Zed
Table of Contents
Symptoms
After installing the Oxc extension in Zed and enabling the Oxlint language server, I encountered the following problems while editing code:
- Oxlint diagnostics took an unusually long time to update after code changes.
- TypeScript diagnostics from typescript-ls also took an unusually long time to update.
- After editing for a while, both Oxlint and TypeScript diagnostics stopped updating until I restarted the language servers.
- Vitest runs from the terminal became much slower.
Cause
I found that Oxlint was starting a new TypeScript process for nearly every keystroke. The resulting processes consumed enough system resources to affect other development tools.
The problem occurs when a project uses type-aware linting and the editor runs the linter on every code change.
The large number of TypeScript processes comes from tsgolint, which Oxlint uses for type-aware linting. The tsgolint developers are aware of the problem, and users have reported the same behavior in VS Code.
Workarounds
A complete fix requires changes to tsgolint. For now, you can reduce the impact by changing your editor settings.
Zed
In Zed, you can debounce diagnostic requests to reduce how often the editor requests diagnostics. The best interval depends on your hardware, but I use 1,000 ms on my machine.
With this setting, diagnostics will not update until at least 1,000 ms after you stop typing. Without the debounce, however, the issue described above caused diagnostics to take more than 10 seconds to update on my machine, so the delay is still an improvement.
{ "diagnostics": { "lsp_pull_diagnostics": { "debounce_ms": 1000 } }}VS Code
I have not tested this workaround in VS Code. VS Code does not appear to provide an equivalent debounce setting, so you can set "oxc.lint.run": "onSave" to run Oxlint only when you save a file.
{ "oxc.lint.run": "onSave", // If auto-save is enabled, add a delay to it. "files.autoSave": "afterDelay", "files.autoSaveDelay": 1000}Verification details and sources
Verification environment
- OS: Windows 11
- Editor: Zed 1.21.0
- Oxc extension: 0.4.8
Verification details
I reproduced the issue with the Oxc extension in Zed and confirmed that adding a diagnostic debounce reduces its impact.
Last verification date
Reference links
Share this article
Follow us for updates
Adding us to your preferred sources on Google makes it easier to find our articles on Google. Also, be sure to follow us on X and our RSS feed.
Next articles
-1.png&w=1080&q=75)
I've been using JavaScript more than my native language since birth. I am nowhere and everywhere on the internet.
I build web apps and browser extensions in TypeScript as a web frontend programmer. I released Shadowban Scanner, a tool that detects shadowbans on X, and Restore Link Card, a tool that brings back link cards. Media outlets in Japan and abroad covered both tools. For iGEM 2023, I built the Wiki for Team Japan-United and helped the team win the Grand Prize. On my blog, I cover news about X and social media, test and troubleshoot bugs, and share frontend development insights.









