Profiling inspections

Running "Analyze Code…" with the default profile on my project takes around 1h 30m to finish. This is on a MacBook 2GHz with 2G RAM.

It seems I need to turn off a lot of inspections to bring this down to a manageable time, but I'd like to know which inspections would really make a difference. Is there any way to find out how much time each inspection contributes to the total running time?

0
11 comments

There is no easy way currently. But you can try and "capture cpu usage data" and post the file somewhere I can get at it and I can tell you what inspections take up the most time. That info would also be very useful for me, because that way I know what inspections to optimize.

Bas

0

By the way, of course I do not need CPU usage data for the entire 1 and a half hours. Half a minute should be more than enough.

Bas

0
Avatar
Permanently deleted user

But then, the "Inspecting Code" dialog is modal, so I can't turn off the cpu profiler while it's running…

0
Avatar
Permanently deleted user

Hmm… I remember that somewhen during the last EAP, Dave released an InspectionGadgets build with a "debug" panel that showed run times for all enabled inspections. It would be nice to have something like that again, this time for all inspections, not only InspectionGadgets.

0
Avatar
Permanently deleted user

Your memory is fading. That panel hasn't been there since 4.0, IIRC.

--Dave Griffith

0
Avatar
Permanently deleted user

Agh! It's really been that long?

0

Cancel the inspection process and quickly turn off the profiler.

Bas

0

Ironically, a change in the inspections API to make them run more efficiently has made it impossible to measure the runtime of the InspectionGadgets inspections. I have a request open for this: http://www.jetbrains.net/jira/browse/IDEADEV-8716
A way to show the runtime of all inspections would be better. Perhaps something like the statistics tab for unit tests. Post a request and I will vote for it.

Bas

0
Avatar
Permanently deleted user

Hello Bas,

Ironically, a change in the inspections API to make them run more
efficiently has made it impossible to measure the runtime of the
InspectionGadgets inspections. I have a request open for this:
http://www.jetbrains.net/jira/browse/IDEADEV-8716

A way to show the runtime of all inspections would be better. Perhaps
something like the statistics tab for unit tests. Post a request and I
will vote for it.


For what it's worth, measuring inspections runtime got even harder in Selena
- we now support running parts of the inspections pass in parallel using
different CPU cores on a multi-core/multi-CPU machine.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

I need more cpu's in my machine!

0
Avatar
Permanently deleted user

Excellent! My dual core laptop investment just payed off!

--Dave Griffith

0

Please sign in to leave a comment.