Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Hangs when dealing with xml's (going to or from them). CPU + Disk spike at this time

Tags:

xml

eclipse

I have to deal with many XML's on a daily basis. This is interrupting my work flow greatly; I've tried downgrading to Indigo but all my add-ons get removed.

The problem occurs when opening an xml; switching to an xml; switching out of an xml (even to another xml). What is happening that makes XML's so annoying? What can I disable, or change, to get better performance?

Restarting eclipse tends to help a bit, but not for long (an hour or so).

During these times my CPU spikes from a few % to 70-80% so whatever it is doing is very resource intensive.

I believe that there is correlation between these times and disk usage as well.

edit: To clarify, it's not just when switching from an xml to another xml, it's also when I change focus from the main xml to another frame, i.e. project explorer, problems, console.

like image 248
RankWeis Avatar asked Oct 30 '12 18:10

RankWeis


4 Answers

I solved it!!! (I've Eclipse Indigo)

  1. Open yourWorkspaceFolder\.metadata\.plugins\org.eclipse.core.resources folder
  2. Delete ".snap" and ".markers.snap" files (I suggest backup them before)
  3. Restart Eclipse
like image 182
user1691159 Avatar answered Nov 13 '22 14:11

user1691159


Sounds like you are hitting a known performance issue with Juno and Juno SR1. The platform team is currently working on a number of performance bugs for SR2, some have already been fixed. I think downgrading to Indigo or Eclipse 3.8 are your only options. Some of the specific bugs related to XML editors:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=391127

https://bugs.eclipse.org/bugs/show_bug.cgi?id=391868

like image 36
Karen Butzke Avatar answered Nov 13 '22 14:11

Karen Butzke


I found a way around it. Took out the xml editor, replaced it with Rinzo XML (but I'm sure any other one would work, that was the first free one I saw), and everything is almost as fast as normal.

like image 3
RankWeis Avatar answered Nov 13 '22 13:11

RankWeis


Did you try disabling all XML validations ?

Windows -> Preferences

Disabling Validation in Eclipse

like image 2
Arun Manivannan Avatar answered Nov 13 '22 14:11

Arun Manivannan