High cpu usage for background inspection

The background inspection was inspecting a 500 line java file. It took more than a minute to complete inspection, with cpu usage about a constant %50. Don't know if that's normal. Captured a cpu profile while it was grinding. It's attached. My IG Telemetry doesn't show any particular inspection consuming more than average time.



Attachment(s):
3316_regan_05.05.2005_08.49.41.zip
4 comments
Comment actions Permalink

Probably duplicate string literal inspection with some common word to
search?

"Russell Egan" <no_mail@jetbrains.com> wrote in message
news:818713.1115297699923.JavaMail.itn@is.intellij.net...

The background inspection was inspecting a 500 line java file. It took

more than a minute to complete inspection, with cpu usage about a constant
%50. Don't know if that's normal. Captured a cpu profile while it was
grinding. It's attached. My IG Telemetry doesn't show any particular
inspection consuming more than average time.


0
Comment actions Permalink

That's not how "Duplicate String" inspection works. It starts searching at the class root, creates a hash of all string literals in the class, and generates the duplicate warnings in one fell swoop. It's not quadratic, and shouldn't be any worse than any other inspection which doesn't require resolution (i.e. surprisingly fast). If you seen any indication that this isn't the case, please let me know.

--Dave Griffith

0
Comment actions Permalink

My guess is that Eugene is talking about the Duplicate String Literal inspection in the category Local Code Analysis", which is a global inspection (with bad performance in many cases). Your Duplicate string literals inspection works great. It's a bit confusing there are two inspections with the same name.

Bas

0
Comment actions Permalink

Wow. I didn't even know that existed. And I have to say I'm very confused by it. Why is it a "Local" inspection, if it's doing whole-project analyses? I realize that fancy index caching is occuring on string values, but is this really the sort of thing that should be going on in the background? Seems reasonable in batch, although I'm not sure I'd use it due to false positive issues, but very odd to be occuring interactively.

--Dave Griffith

0

Please sign in to leave a comment.