Comments (9)
@ljharb yep, it does
from eslint-plugin-import.
What happens if you set the disableScc
option to true
? Does it restore the v2.29 speed?
cc @soryy708
from eslint-plugin-import.
IMO it's a good heuristic because:
- If your project is small, lint takes seconds, so you don't care about performance as much, don't mind the overhead
- If your project is large, lint takes minutes, so you care about performance, and want more efficiency
Defaults that cater to large codebases (perhaps at the expense of tiny ones) are good, while there is an escape hatch in case the user cares enough.
from eslint-plugin-import.
Same for me: it is worse now. Went from
Rule | Time (ms) | Relative
:------------------------------------|----------:|--------:
import/no-cycle | 5091.198 | 31.2%
to
Rule | Time (ms) | Relative
:------------------------------------|----------:|--------:
import/no-cycle | 6829.761 | 39.1%
from eslint-plugin-import.
Cool, glad we decided to put disableScc
in.
The SCC is a pre-processing we do to speed up no-cycle
to enable early-exit (short-circuiting). In large projects with many files to lint, it prunes a lot of unnecessary work, but in small projects the preprocessing can take longer than the time it saves.
from eslint-plugin-import.
Is there any way we could figure out a heuristic, and dynamically figure out whether it’ll be faster to use scc or not?
from eslint-plugin-import.
Is there any way we could figure out a heuristic, and dynamically figure out whether it’ll be faster to use scc or not?
I don't have anything in mind. It depends on a lot of things - the user's hardware, cpu, how fast their hdd/ssd is...
If the heuristic will be right then great, the user won't need to configure anything.
But what if the heuristic will be wrong? They'll need to override the heuristic's decision, either to enable or to disable SCC.
from eslint-plugin-import.
That’s already the case - we just chose a heuristic of “always use scc”. The hope would be do minimize how many users have to enable or disable scc explicitly.
from eslint-plugin-import.
I totally agree that it's the right heuristic :-) i'm just wondering if we can fine-tune it a bit for projects in the 20-70s range.
from eslint-plugin-import.
Related Issues (20)
- This plugin does not report `import/extensions` and `import/no-unresolved` errors on `import type …` constructs HOT 3
- Making `ExportMap` available in `eslint-module-utils`?
- Update `tsconfig-paths` dependency to v4 HOT 1
- Regression in import/order rule after v2.26 HOT 1
- Mixed `type` imports does not trigger `import/no-duplicates` HOT 1
- Config to match vscode import sorting default HOT 2
- corrupted dependencies on windows?
- How to make it recognise internal modules as not external?
- Support for eslint v9 alternative HOT 1
- `import/consistent-type-specifier-style` for exports HOT 1
- eslint(import/named) reports `not found` errors in 2.30.0 HOT 7
- Enhancement: [import/no-restricted-paths] accept target exceptions HOT 5
- Missing documentation on how to setup eslint-plugin-import with flat confiuration and Typescript HOT 13
- eslint > 9 as peer dependency of eslint HOT 3
- Rule to detect import of modules with and without directives HOT 3
- import/no-named-as-default-member rule became less useful in 2.30.0 HOT 1
- Missing `^9` eslint peer dependency HOT 2
- After upgrade from 2.29.1 to 2.30.0 get "Parse errors" in react-toastify: "parser.parse is not a function (undefined:undefined) import/no-deprecated" HOT 13
- 🐞: [import/newline-after-import] Cannot recoginize the last require when use import and require in the same file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-import.