Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Eclipse so slow at saving individual JavaScript, HTML and CSS files only?

I am using Spring's bundle of Eclipse, STS version 3.6.0 which is based on Eclipse Kepler SR2 (4.3.2). Eclipse performance is generally very good and if I save a Java file, it is instantaneous. However, when I try to save a JavaScript file it can take up to 3 seconds to save and the entire IDE is frozen during the process, which is very annoying and it actually impacts productivity. I have done some digging and apparently, there are validators and such that cause slow down so I have tried turning these off but it doesn't make a difference.

The problem also occurs with CSS and HTML file types so I'm sure it's specifically with the web-development plugins. Can anyone suggest a way of fixing this? I am willing to disable features to improve the save times if necessary.

Note: I am using stock version of STS - no extra plugins.

like image 622
Paul Drummond Avatar asked Aug 21 '14 07:08

Paul Drummond


2 Answers

At first I thought this was something to do with git, and disabling it did help a bit (see old answer below), but after some further use, the problem persisted. Eventually, I realised that the problem is with the Package Explorer! If I have the Link with Editor button selected and the package explorer tree is expanded, then Eclipse is eclipse is extremely slow at saving anything but Java source code. If I unselect Link with Editor and ensure the tree is collapsed, it all works fine.

Old Answer:

Turns out this was related to egit somehow. I don't use the git integration in Eclipse so I just disabled git support for the project using the Team->Disconnect command.

like image 166
Paul Drummond Avatar answered Sep 27 '22 20:09

Paul Drummond


One possibility is corrupted eclipse .project and/or .settings. I experienced up to 25 seconds delay. Try deleting those file/folder and recreate the project again.

like image 39
Nguyễn Minh Vũ Avatar answered Sep 27 '22 19:09

Nguyễn Minh Vũ