-
-
Notifications
You must be signed in to change notification settings - Fork 43
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: n/prefer-node-protocol
could use optimization
#404
Comments
I guess some memoization/caching of It should at most have to do those checks once for every unique version number.
|
I've done some investigation on this topic, and it seems that there are no significant gains from memoizing With
With simple Object-based cache:
With flru:
I started digging a little further with Node's
And https://github.com/sveltejs/svelte/blob/main/packages/svelte/src/reactivity/date.test.ts where I don't have data for
Is there anything that stands out about these files that could contribute to that? Or maybe something that hints at what to look at in the rule itself? Curious to hear your thoughts! |
Environment
Node version: 22.11
npm version: pnpm 9.15.3
ESLint version: 9.9.1
eslint-plugin-n version: 17.9.0
Operating System: Linux
What rule do you want to report?
n/prefer-node-protocol
Link to Minimal Reproducible Example
https://github.com/sveltejs/svelte
What did you expect to happen?
If I set
TIMING=20
while running eslint, I can see that almost half the time linting the Svelte codebase is spent on this ruleParticipation
Additional comments
No response
The text was updated successfully, but these errors were encountered: