3

As an Android developer I've been moving away from Eclipse to Intellij IDEA for production code in anticipation of Google's Android studios which shares a code base with IDEA.

My experience has been a good one up to this point. I've only been using IDEA at the office, where I have a 4x core Intel i7 machine running Ubuntu 12.04 LTS (Sun JDK/JRE), up to this point and I've never noticed what the performance of IDEA really is.

Now however after setting IDEA up on my personal computer at home the performance is abysmal. Memory usage is normal, but the constant CPU usage bounces between 80%-100% (over the whole application lifecycle). And that is when nothing else is running on the machine and no work is being done, by me or visually by the IDE.

This makes IDEA unusable when working on it, and I can forget about having anything else running along side it.

My home specs and software are:

  • Intel Core 2 duo 3GHz
  • 8 GB RAM
  • Ubuntu 12.04 x64 LTS (3.8.0-35-generic) running of SSD SATA
  • Intellij IDEA 13.0-0ubuntu1 build: IC-133.193
  • Tried both OpenJDK and Sun

And the strange thing is that this happens as well with Android Studios.

All help in trying to debug this behaviour would be appreciated.

#Edit 1:

Noticed that the CPU load falls down to 20% when bringing up dialogs (Project structure, Settings, etc) and then goes right back up when dismissing them.

#Edit 2:

I tested simply getting the tarball straight from JetBrains, instead of using the one in Canonical's ppa. The performance was significantly better for at least an hour (20-30% CPU usage while idle). Seems that the native file watcher in C-PPA wasn't working properly and was indexing the whole filesystem. However the performance became worse after the first hour or so, going back to 90-100% CPU.

Martin
  • 2,573
  • 28
  • 22
Hrafn
  • 2,867
  • 3
  • 25
  • 44
  • Depending on which variants of each chip, your 4-core i7 is likely at least 4x more powerful that your Core 2 Duo. Actual figures vary. For example, see http://browser.primatelabs.com/processor-benchmarks. – dbrown0708 Jan 16 '14 at 20:52
  • Yeah there is a big performance difference between the two, but that doesn't make it normal for the IDE to use up to 100% constantly while idle. – Hrafn Jan 20 '14 at 04:31
  • 2
    Considering Android Studio CPU usage, you should give it a try to [this][1]. [1]: http://stackoverflow.com/a/20176843/1053097 – muneikh Apr 06 '14 at 15:38

4 Answers4

1

The issue turned out to be the native-file watcher being out-of-date. IntelliJ was re indexing my whole drive it seems. Was fixed by uninstalling the version gotten from Canonical's ppa and installing directly from JetBrain's own webpage.

Hrafn
  • 2,867
  • 3
  • 25
  • 44
0

Usualy I manage to fix it by deleting IDE's index files rm -rf ~/.RubyMine60/system, don't forget to change .RubyMine60 to IDEA's config folder

amenzhinsky
  • 962
  • 6
  • 12
  • Thanks for the answer but RubyMine is a Ruby on Rails IDE. And the high CPU usage is current over the whole application lifecycle, not just during indexing. So this isn't relevant to my problem. – Hrafn Jan 16 '14 at 14:55
  • Yes it does. How ever removing this config folder does nothing to fix my problem. As soon as the path to the JDK is added back into IDEA, some internal process starts up that is the cause of the CPU load. – Hrafn Jan 16 '14 at 15:47
0

Are you using any plugins outside of the included ones which might cause issues.

I don't run Ubuntu anymore but can't recall any issues with high CPU-usage when i did. (I use Fedora with KDE a colleague uses Fedora with GNOME though. ) Does this always happen or only when you have a project open? I'm thinking if this might have something to do with the background-compile that IDEA does. Might be worth trying to turn this off.

Found under Project Settings -> Compiler -> Make Project Automatically

worst case it is a Unity-integration issue or something. Haven't used unity so can't say.

trappski
  • 1,066
  • 10
  • 22
  • Thanks for the answer. I have GNOME, so the problem isn't Unity. And MPA is turned off. There are no plugins except those that come with the IDE. – Hrafn Jan 16 '14 at 14:51
0

If you're willing to do some sleuthing, you could run the Oracle JVM and use the VisualVM profiler to see where the IDE is spending all its time, presuming it's a Java-based process that's actually eating your CPU cycles.

Scott Barta
  • 79,344
  • 24
  • 180
  • 163