-
-
Notifications
You must be signed in to change notification settings - Fork 763
perf(vscode): search for root directory oxlint/oxfmt binaries, before searching with glob #17345
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
base: main
Are you sure you want to change the base?
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
2bb6f02 to
b9ec375
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a performance optimization for binary path searching in the VSCode extension by checking the workspace root's node_modules/.bin directory before performing an expensive glob search. This improves performance especially on Windows where glob operations are slow.
Key Changes
- Extracted binary search logic into a dedicated
searchNodeModulesBinmethod - Added fast path check using
workspace.fs.statbefore falling back to glob search - Renamed parameter from
defaultPatterntodefaultBinaryNamefor clarity
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
07bd6c4 to
99d578e
Compare
… searching with glob
99d578e to
b134a5e
Compare
|
There’s probably a simple answer, but why do you need to search for anything other than node_modules/.bin for each of the workspace folders? Users in a monorepo with the package installed in the root would just work. Users in a monorepo with only a single version of the package could specify the path to one of them and that would work. This wouldn’t work for users in monorepos that want to use different versions for different packages, but is that something that really needs to be supported? |
|
My thought about searching deeper was:
IMO this is creating too much overhead. Use one tool for the complete editor experience. Or we need to start X numbers of language server |
|
If only one package is using it within the monorepo, users could specify the path to the tool. This wouldn’t be saved in their project settings and typically committed, so I don’t think this is a problem. It’s not automatic, but it isn’t difficult or time consuming either. I think those two alone cover most use cases and you wouldn’t need to use the VS Code search to find the file. Just something to consider, I don’t think either your current approach or my suggestion is wrong. They just prioritize one behavior over the other, so it’s a trade off. |
|
Your point is valid :) I was am not sure, if we want to include a manual user defined setting for this use case. |

No description provided.