Eclipse eating the CPU

Just a short post, maybe it will help someone. Lately, while working on a big PHP project, I was experiencing a problem with CPU usage. After some time of coding eclipse was using all four CPU cores, which resulted in general system slowness and quick eating my laptop battery.

I was chasing this problem for a few days, doing some random stuff (detaching the project from SVN, disabling syntax highlighting, code completion and syntax validation). Neither of this worked. But I was able to narrow down the problem: the CPU usage was going up as I was opening JavaScript files. After some times of trying bunch of different solutions I found it.

When creating my PHP project, I checked the JavaScript support option. I thought that as we use quite a lot of JavaScript, this maybe useful (whatever it does). After disabling this option, my problem were gone. After a few hours of work Eclipse uses 1-4% of a single CPU core (instead of 380%).

One more thing to note: as I didn’t find the obvious way of disabling the JavaScript support for my existing project, I simply closed Eclipse, opened the .project file in other editor and removed the JavaScript Nature line (org.eclipse.wst.jsdt.core.jsNature). And voilà! Problem solved.


1 thought on “Eclipse eating the CPU”

  1. Thank you very much! That solved my problem.
    I’m working on several machines for several projects and only on one of these systems i had this stupid 100% CPU-Eclipse problem.
    This bug is very hard to find, so thanks a lot for saving me a lot of time!


Leave a Comment