Plugin wanted: code inspection statistics

The recent javalobby post requesting feedback about the new 6.5 browser quirks mode inspections resulted in lots of people complaining about the performance of IntelliJ.

So here's my idea - provide statistics about the code inspections - ie how long they take, preferably as a percentage.For example, I assume doing things like calculating the cyclomatic complexity takes longer than a lot of other inspections. Or maybe the inspections provided by a plugin have been badly coded and run slowly.

Being able to see which inspections take the most time, I could turn them off and get back to the fast IntelliJ of old!

(Having said that, I think the current version is just fine in terms of performance.)

Perhaps someone can write a plugin.

Comment actions Permalink

This actually existed back in the 4.5 days, at least for the InspectionGadgets inspections, but proved to be spectacularly useless in practice. No one much bothered to look at the numbers, or report performance issues. The inspection developer (me) was able to clean up some issues, but otherwise it mostly just confused people.

As an aside, cyclotomic complexity is quick to calculate, as it basically just amounts to the counting branch statements in a method. Once the parse trees are loaded (as they are for the open editor files), it's trivial to calculate hundreds of complexity counts per second. The coupling counts are more expensive, but still not problematic. If you're having performance issues, you probably just need to up your memory.


Comment actions Permalink

Yes, I used that too, and I miss it quite a bit now. For inspection developers it is a useful thing to have. See

Would be nice for intentions too I think. I fixed some serious performance issue in one or two intentions during the 6.0 EAP, but needed some cumbersome profiling to do that.


Comment actions Permalink

Boosting memory won't help.

I started off by turning on all inspections. I wanted to see what came up. I've progressively turned off inspections I don't need or want.

But when you have a class that's 2000 lines long (don't ask) the inspection can take around 10 seconds.

It means that if you do a quickfix that changes things such that something else can be quickfixed, you have to wait 10 seconds for that to show up.


Please sign in to leave a comment.