-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Even larger import/no-cycle
performance downgrade in 2.30.0
#3047
Comments
Same for me: it is worse now. Went from
to
|
What happens if you set the cc @soryy708 |
@ljharb yep, it does |
Cool, glad we decided to put The SCC is a pre-processing we do to speed up |
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. |
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. |
IMO it's a good heuristic because:
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. |
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. |
Created an issue to add |
@jzaefferer @diegodorado Please try version 2.31.0, it includes the fix from #3068. |
With 2.31.0, the performance is much better with the default scc on (no
Very nice! Since I created this ticket, I'll take the liberty to also close it 💃 |
Sadly, it didn’t fix the issue for us. After upgrading, the total lint time went from 1m36s to 2m54s on my machine (linting over multiple packages in a monorepo). Here are the specific timings for one example package with our settings:
v2.31.0,
and with
on v2.30.0, I’m getting the following results: v2.30.0,
and with
So, all settings in v31 perform worse than v30. |
What happens if you remove |
for v30, it becomes a bit faster (with
for v31, still not really better
|
#2348 was supposed to get fixed in 2.30.0, but for my project the performance of
import/no-cycle
got even worse.With 2.29.1 it took 21s:
With 2.30.0 it took 67s, 3.2 times slower:
I also tried
'import/no-cycle': [2, { ignoreExternal: false, maxDepth: 3 }],
, which was suggested in the previous ticket, but that made no performance difference. It did find more errors though.Are there other measurements I can share? Like a cpu profile? I'm not sure what's useful here and didn't find good clues in #2348.
The text was updated successfully, but these errors were encountered: