testing the alpha against our project right now. s...
# detekt
g
testing the alpha against our project right now. seems to be extremely slow, taking over 15 minutes for some modules already. is there by chance a way to output time spent per rule or something like that to narrow down the reason?
g
—`-debug` should provide some insights. If not, please open an issue
👍 1
g
somehow it was a lot quicker this time around, still some modules that took over 5 minutes though
Copy code
2025-09-05T11:36:39.690+0200 [INFO] [system.out] Phase LoadConfig took 19.157156ms
2025-09-05T11:36:39.691+0200 [INFO] [system.out] Phase CreateSettings took 1.322825251s
2025-09-05T11:36:39.691+0200 [INFO] [system.out] Phase ValidateConfig took 55.431897ms
2025-09-05T11:36:39.691+0200 [INFO] [system.out] Phase Parsing took 34.761us
2025-09-05T11:36:39.691+0200 [INFO] [system.out] Phase Binding took 5m 27.293048973s
2025-09-05T11:36:39.691+0200 [INFO] [system.out] Phase LoadingExtensions took 7.486400ms
2025-09-05T11:36:39.691+0200 [INFO] [system.out] Phase Analyzer took 13.936989472s
2025-09-05T11:36:39.691+0200 [INFO] [system.out] Phase Reporting took 29.036972ms
could be that some stuff made it into the build cache even though I canceled the previous build
b
Thanks for the issue. We want to work on benchmarking and profiling detekt because the performance is a really critical point in a static analysis tool. But it looks like the APIs that k2 provide us for doing the analysis are just slower and we can do very little about this. They promise to make them faster.
Also, once https://github.com/detekt/detekt/pull/8513 is merged we will be able to remove the support of the legacy type solving. This should, probably, shave the Binding phase in a half. From 5 minutes to 2.5.
(And I'm not sure why I don't write that in the issue directly 😅)
g
halving it would be a big improvement already