简体   繁体   中英

Eclipse Luna takes a long time saving an xml file :(

About a month ago I went from Windows to a MacBook Pro. Same Eclipse version, (almost) same settings, but it frustrates me that saving an xml file takes about 10s :(... Even if I just delete/add a space char.

I have a lot of files, about 10 projects opens in Eclipse but my old Windows box with an old quad core (not even an i7) had no problems with this.

I know this is a knows problem in Eclipse and I had it in the past as well, but it was solved after a few upgrades in the past.

Currently I run on the latests Luna version, with up2date plugins, tried a lot of possible solution, most from SO, but still not solved. Please some help.

I am using EE Eclipse to mainly develop java web apps and use the following plugins: AspectJ (with Xref), EGit, JGit, CheckStyle, Maven, TestNG. All files are stored as UTF-8

Editing the xml file is slow in both the text and the xml editor. It concerns xml files that are located in a java package (in the /src/main/java/ folder).

The strange thing is that Editing an xml file in a project-root subfolder isn't slow, like: project-root/test-output/bla.xml (works well in both the text and xml editor)... weird... Both files (the slow and fast save one) are part of version control and used by Git.

In case I copy the slow file to the folder project-root/test-output/, it's also saved fast :(

Renaming the slow file such that it has the "txt" extension and editing with the text editor has not effect.

I thought it is caused by some builder that works only on the java source folder... The project has a Java and Maven builder. Disabling them has no effect.

The Eclipse log file doesn't contain any relevant exception. It contains some key-binding exceptions and resource tree locked modifications, but these exceptions are old.

What I tried (what I can remember): + Disabled all validation (especially the xml validation), for all projects. + Ensure all latest updates are installed of all plugins, including the EGit plugin. + Disabled Checkstyle. + ...

Any ideas as I am getting a bit frustrated about this?

A poor-man's solution may be in

  1. switch to a empty workspace ( workspace2 in example)
  2. create a new pde-plugin-project ( mytestplugin in example)
  3. debug the mytestplugin means you debug a instance of eclipse too, so use the workspace you usually work with in the debugging-second-eclipse.
  4. Now: save the xml-file in the debugging-second-eclipse with the workspace you usually work with, quick jump to the first eclipse and press "pause" to stop the second-eclipse.
  5. inspect the compleate debug-stacktrace-thread-tree in the debug view (please post the image as a comment here).

Regards

When Trying the solution of @Peter I noticed that the workspace I was using was located in the "eclipse.app" file like this:

/Applications/eclipse/Eclipse.app/Contents/MacOS/D:\\Users\\Ed\\Develop\\Projecten\\EclipseWorkSpace/

No idea why/how this happened. However, I moved this workspace to a "normal" directory in my home folder, and how saving an xml file work normal, fast as expected... No idea why having the workspace located in the eclipse.app made it slow, but it works ...

Open eclipse.ini. Increase -Xms, -Xmx This works for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM