-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
perf(npm): use linked binary package for startup boost #2920
perf(npm): use linked binary package for startup boost #2920
Conversation
This script should improve startup performance of CLI by ~2-3 times and very huge impact for lint-staged, pre-commit and pre-push commits
How does the root package know which binary to call if the oxlint bin script is removed 🤔 ? |
@Boshen it is will used from one of optional dependency |
@Boshen oxlint itself blazingly fast but nodejs overhead caused it to be slow for startup. Actually, biome, dprint and most of rust projects suffers from this bug/slowdown see https://github.com/dalisoft/json-lint-benchmark?tab=readme-ov-file#pull-requests as reference to other rust projects slowness PR |
@Boshen it should work after upload/publish and install into project. After build, try link and install on some project, then test |
@Boshen i'm added my own repo to demonstrate the how fast is oxlint itself https://github.com/dalisoft/oxlint-rs-npm/tree/master/benchmark
|
We need the bin script in the For your benchmark, it's ok to call the binary via |
I understood, thank you. So i'll close the this PR then |
This changes/PR should improve startup performance of CLI by up 8 times and very huge impact for lint-staged, pre-commit and pre-push commits
Benchmark using
hyperfine
oxlint
./node_modules/@oxlint/darwin-arm64/oxlint
Benchmark script