Scala Plugin using 200% CPU doing apparently nothing

In recent builds I've noticed my computer fan going on when doing nothing.

If I turn on IDEAs "Power Save Mode" the CPU level goes down to almost nothing.

I did some analysis using VisualVM and it appears to be spending most of its time in:

  • org.jetbrains.plugins.scala.annotator.ScalaAnnotatorHighlightVisitor.analyze()


which in turn is spending most of it's time in recursive calls to:

  • org.jetbrains.plugins.scala.lang.psi.types.Bounds$.checkClasses$1()

which spends probably most of its time repeatedly in:
  • org.jetbrains.plugins.scala.lang.psi.impl.ScalaFileImpl.getViewProvider();  and
  • com.intellij.psi.SingleRootFileViewProvider.isPhysical()


Instinctively it seems odd that the highlighting code should be doing anything CPU intensive if no editing is taking place.  The CPU continues to be used apparently for ever and well beyond the time it takes to highlight the code that is being displayed at the time.

I've attached a VisualVM snapshot file.

I was using the latest Scala plugin 0.4.1273  but I've also noticed the same behaviour for the last few builds of the plugin and it may have been an issue for some time that I just haven't noticed.


Attachment(s):
1312299681235.nps.zip
1 comment
Comment actions Permalink

Do you have typing freezes?
First of all CPU usage after any typed symbol s normal behavior. I mean that after any change we should rehighlight whole file. Highlighting is in progress while in right top corner you can see an eye (if you mouse over this eye you will see progress, if it's stuck because of exception you also will see it).
If it works forever then you possibly have some exceptions. Please send me you log file from folder USERPROFILE\.IntelliJIdeaXX\system\log.
In case of exception It would be great to provide an example if it's possible (or just give me a link to repository if it's opensource).

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.