1289

How can you make the experience with Eclipse faster?

For instance: I disable all the plugins I don't need (Mylyn, Subclipse, …).

Instead of using a plugin for Mercurial, I configure TortoiseHG as an external tool.

Nicolás Alarcón Rapela
  • 1,998
  • 1
  • 13
  • 27
user2427
  • 7,492
  • 18
  • 57
  • 71
  • 41
    Install more (another 4GB of) RAM. I'm being somewhat serious. Eclipse runs well on a 3GB windows 7 box. Not so hot with less memory. –  Dec 10 '10 at 05:20
  • 11
    Version control would be my last choice of plugin to disable. I have found Eclipse is still somewhat unreliable when it comes to keeping the workspace in sync with the file system. I don't blame you for wanting better VC tools than the stuff in current plugins but I've been bitten before by Eclipse in this area. – Kelly S. French Dec 10 '10 at 15:13
  • 84
    The answers herein reduced my Eclipse startup time from 20 seconds to less than 4. – HDave Mar 10 '12 at 23:33
  • 1
    Similar post: [what are the best jvm settings for eclipse](http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/) – Christophe Roussy Nov 21 '12 at 08:52
  • 4
    Eclipse Juno has been super slow for many people, things like switching editors etc. There's now bunch of upstream performance fixes that improve the situation A LOT. See http://wiki.eclipse.org/Platform_UI/Juno_Performance_Investigation for instructions on installing the patches. – vertti Jan 15 '13 at 10:28
  • 3
    Still super slow for me with no plugins. The startup time isn't too bad, but any time it has to update the file references or something, it takes unreasonably long. It also lags sometimes for autocompletion. – sudo Jul 26 '14 at 00:46
  • `-Xverify:none` will help at startup. – Christophe Roussy Aug 08 '14 at 08:22
  • Note: Early releases of Eclipse 4.x had a slow GUI implementation. This became better with later versions. – Thorbjørn Ravn Andersen Jan 31 '16 at 20:34
  • unchecked "build automatically". Go to Project--Build Automatically. – rajeev pani.. May 21 '17 at 07:23
  • You can not, it's broken beyond repair. – Zsolt Szatmari Jan 11 '20 at 10:23

43 Answers43

450

The three most influential factors for Eclipse speed are:

  • Using the latest version of Eclipse (2020-06 as on 26 June 2020)
    Note that David Balažic's comment (July 2014) contradicts that criteria which was working six years ago:

The "same" workspace in Indigo (3.7.2) SR2 loads in 4 seconds, in Kepler SR2 (4.3.2) in 7 seconds and in Luna (4.4.0) in 10 seconds. All are Java EE bundles. Newer versions have more bundled plugins, but still the trend is obvious. (by "same" workspace I mean: same (additionally installed) plugins used, same projects checked out from version control).

  • Launching it with the latest JDK (Java 14 at the time of writing, which does not prevent you to compile in your Eclipse project with any other JDK you want: 1.4.2, 1.5, 1.6 older...)

      -vm jdk1.6.0_10\jre\bin\client\jvm.dll
    
  • Configuring the eclipse.ini (see this question for a complete eclipse.ini)

      -Xms512m
      -Xmx4096m
      [...]
    

The Xmx argument is the amount of memory Eclipse will get (in simple terms). With -Xmx4g, it gets 4 GB of RAM, etc.


Note:

  1. Referring to the jvm.dll has advantages:
  • Splash screen coming up sooner.
  • Eclipse.exe in the process list instead of java.exe.
  • Firewalls: Eclipse wants access to the Internet instead of Java.
  • Window management branding issues, especially on Windows and Mac.

Dec. 2020, Udo conforms in the comments

From version 4.8 (Photon) an up there was a steady speed gain after each version.
The main platform was optimized every release to load faster, enable more features for the dark theme and to add more features for newer Java versions for the Java development tools.
Especially with-in the last 3 versions the startup time was increased a lot. There should be a significant increase in start-up time with the newest version of Eclipse 2020-12.

In my experience it started a lot faster with each new version.
But: There are still plug-ins which do not follow the new way of using the Eclipse API and are therefore still slow to start.
Since the change to Java 11 as the minimum runtime version starting from Eclipse version 2020-09 at least the core system uses the newer features of the JVM. It is up to the providers of the other plug-ins to upgrade to newer APIs and to use the full power of modern CPUs (e.g. concurrent programming model).

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • 9
    What would the jvm.dll equivalent be on other operating systems? – Daniel Rucci Apr 01 '11 at 20:58
  • 16
    @Dan: From http://wiki.eclipse.org/Equinox_Launcher#Finding_a_VM.2C_Using_JNI_Invocation_or_Executing_Java: "`jvm.dll` on window, **`libjvm.so`** on 'nix platforms". – VonC Apr 01 '11 at 21:02
  • 3
    @Dan: Don't mix it up with `libjava.so`: On Linux, `libjava.so` depends on `libjvm.so`, but the converse is not true: `$ readelf -d libjava.so` `Dynamic segment at offset 0x208a8 contains 25 entries:` `Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libjvm.so] [...]`: When the library contains such information, `ld.so` will load `libjvm.so` automatically when a process loads `libjava.so`. – VonC Apr 01 '11 at 21:08
  • 1
    @Dan when no -vm argument is given it will use jvm.dll on windows and platform default library (e.g libjvm.so) on other OS'es by default; according to the link posted by VonC _"But it can also have some drawbacks if you [try to push the memory too high.](https://bugs.eclipse.org/bugs/show_bug.cgi?id=188968#c23)"_ – Drupad Panchal Jun 28 '11 at 14:30
  • 1
    @Dan: On my (MacOS) Snow Leopard the eclipse.ini the config entry was: -vm /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libjvm.dylib – Willem Dec 06 '11 at 10:10
  • I would recommend living initial heap size equal to the maximum: ``-Xms384m -Xmx384m``. That way the GC wouldn't have to stop the JVM to allocate more memory every now and then. – Elias Dorneles Apr 09 '12 at 11:53
  • oh yes! the startup improved drastically! but it was easy in my case, cause my -Xms was too low... I got this tip from a guy who tunes JBoss environments. :) – Elias Dorneles Apr 09 '12 at 11:58
  • What do you mean by "-vm jdk1.6.0_10\jre\bin\client\jvm.dll"?? I honestly don't understand where that goes – IgorGanapolsky Dec 05 '12 at 20:30
  • @IgorG. you can see it in http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse#144349 – VonC Dec 05 '12 at 20:45
  • 4
    "using the latest version of Eclipse" - Well in my experience it is the opposite. The "same" workspace in Indigo (3.7.2) SR2 loads in 4 seconds, in Kepler SR2 (4.3.2) in 7 seconds and in Luna (4.4.0) in 10 seconds. All are Java EE bundles. Never versions have more bundled plugins, but still the trend is obvious. (by "same" workspace I mean: same (additionally installed) plugins used, same projects checked out from version control) – David Balažic Jul 22 '14 at 12:27
  • 1
    There is no more PermSize option in Oracle Java 8. (you can keep it, it will be ignored) – David Balažic Jul 22 '14 at 12:29
  • @DavidBalažic good points. You can edit and add them in this 5+ years-old answer. – VonC Jul 22 '14 at 12:30
  • @VonC, if you're the author of the answer, you should edit it. My edits would need a peer review first anyway. (is there a user to user messaging functionality on SO?) – David Balažic Jul 22 '14 at 13:07
  • @DavidBalažic no, it is a community-wiki answer: edit away :) – VonC Jul 22 '14 at 13:08
  • I added only the bit about MaxPermSize as my other comment was about startup time and not general performance which is the topic of this question. – David Balažic Jul 22 '14 at 13:37
  • 1
    With Java 8+ use `-XX:MaxMetaspaceSize` instead of `-XX:MaxPermSize`. – Ogmios Nov 10 '17 at 04:29
  • Close unused projects, disable spell checker and other checks you do not need. – Christophe Roussy Mar 29 '18 at 12:07
  • 1
    FYI: Eclipse 2019.09 (v4.13) takes 13 seconds to start, for the same workspace as before. And it is a newer and faster PC... JDK is version 11.0.5 – David Balažic Dec 13 '19 at 12:50
  • From version 4.8 (Photon) an up there was a steady speed gain after each version. The main platform was optimized every release to load faster, enable more features for the dark theme and to add more features for newer Java versions for the Java development tools. Especially with-in the last 3 versions the startup time was increased a lot. There should be a significant increase in start-up time with the newest version of Eclipse 2020-12. – Udo Dec 30 '20 at 22:32
  • @Udo That is great! But is the "significant increase in start-up time" a good thing?Meaning: it is slower to start? – VonC Dec 30 '20 at 22:45
  • In my experience it started a lot faster with each new version. But: There are still plug-ins which do not follow the new way of using the Eclipse API and are therefore still slow to start. Since the change to Java 11 as the minimum runtime version starting from Eclipse version 2020-09 at least the core system uses the newer features of the JVM. It is up to the providers of the other plug-ins to upgrade to newer APIs and to use the full power of modern CPUs (e.g. concurrent programming model). – Udo Dec 30 '20 at 23:13
  • 1
    @Udo OK, thank you for the feedback. I have included your comments in the answer for more visibility. Free free to edit if you need to. – VonC Dec 30 '20 at 23:43
271

Add -Xverify:none to your eclipse.ini file.

It will cut down your Eclipse startup time considerably (50% in my case if not more). This will tell the VM not to validate all the .class files it is loading.

Consider this: Never Disable Bytecode Verification in a Production System (as mentioned in the comments)

David Balažic
  • 1,217
  • 1
  • 18
  • 44
Assem
  • 59
  • 1
  • 2
  • 2
  • 4
    Yeah, this works! My RAD is loading considerably faster after adding this option. – jobinbasani Oct 14 '11 at 15:00
  • 1
    This makes a huge difference. I spent the last 30mins looking for this option. I have it set at work, but not at home. :( – pestilence669 Jan 29 '12 at 22:08
  • 3
    I added this and it returned **Error occurred during initialization of VM Incompatible minimum and maximum heap sizes specified** – adamwong246 Apr 20 '12 at 19:22
  • 48
    What is the purpose of class validation? If we disable at the startup, when would Eclipse get a chance to do it? – Ken Russell Dec 14 '12 at 14:34
  • When I add this option (Using STS), I get this error: Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.core.internal.registry.osgi.ExtensionEventDispatcherJob – eugenevd Jun 19 '13 at 11:32
  • 16
    @RajkumarMasaniayan class validation is the step that ensures that the code to be run does not try to trick the JVM. – Thorbjørn Ravn Andersen Jun 25 '14 at 13:08
  • 11
    Basically if you disable the class verification any Java class with an exploit can escape the Java virtual machine (JVM) and execute any code it wants as your user account. In general, if your security depends on JVM containment, do not disable verification. However, considering that Eclipse plugins can write new files to the filesystem and launch any executables you have plenty of attack surface even with the verification. As a result, I think that having class verification enabled with Eclipse does not really improve your security at all. – Mikko Rantalainen Sep 26 '17 at 07:20
  • 1
    @MikkoRantalainen what kind of class with exploit can be "skipped" then with class verification enabled? in other words, when would class verification do prevent an exploit? @ ThorbjørnRavnAndersen do you have an example of "the code to be run" ? An eclipse plugin, ... ? This option looks interesting, but maybe to be "taken with care" – el-teedee Sep 15 '18 at 14:03
  • 2
    @el-teedee, https://blogs.oracle.com/buck/never-disable-bytecode-verification-in-a-production-system – Mikko Rantalainen Sep 16 '18 at 15:45
  • 2
    For example, even if bytecode verification is only partial, full read/write access to filesystem can be acquired: https://tools.cisco.com/security/center/viewAlert.x?alertId=5148 – Mikko Rantalainen Sep 16 '18 at 15:51
  • Wow this gave me like 80% improvement on startup – Brent Sandstrom Mar 05 '19 at 15:42
  • does it matter where in the .ini file you put the -Xverify:none statement? – JesseBoyd Jun 05 '19 at 17:38
  • @JesseBoyd It shouldn't – java-addict301 Nov 07 '19 at 15:54
  • 1
    Eclipse was running sluggish all the time despite restarts being given huge amounts of memory in the .ini and wasn't even using all my system resources (so I have no idea what it was doing). This seemed to fix it. – java-addict301 Nov 07 '19 at 15:55
  • 3
    Please not that this configuration is obsolete and forbidden in the latest java 14 – pdem May 07 '20 at 15:50
  • 2
    `-Xverify:none` has been deprecated since Java 13 – Sina Madani Aug 04 '20 at 13:39
123

Go to Windows -> Preferences -> Validation and uncheck any validators you don't want or need.

For Eclipse 3.7, you use Windows -> Preferences -> General -> Startup and Shutdown.

Sam R.
  • 14,850
  • 9
  • 56
  • 106
Colm Ryan
  • 1,158
  • 2
  • 13
  • 12
87

Make sure that you're using the Sun JVM to run Eclipse.

On Linux, particularly Ubuntu, Eclipse is installed by default to use the open source GCJ, which has drastically poorer performance. Use update-alternatives --config java to switch to the Sun JVM to greatly improve UI snappiness in Eclipse.

chromakode
  • 327
  • 2
  • 5
51

Close any open projects which are not in current use.

Try to switch off the auto publish mode during development.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Nrj
  • 6,226
  • 6
  • 44
  • 56
  • 4
    Just learned this trick the other. Closing unopened one (I must have about 20-30 in my workspace) made an immediately noticeable difference. – tunaranch Nov 25 '08 at 03:59
50

Thanks for the hints. These options (mentioned above) helped me a lot:

Windows:

Increasing memory & regarding to my updated Java version in eclipse.ini:

-Dosgi.requiredJavaVersion=1.6
-Xms512m
-Xmx512m
-XX:PermSize=512m
-XX:MaxPermSize=512M
-Xverify:none

Additionally, since we are optimizing for speed, setting -Xms to the same value as -Xmx makes the JVM start with the maximum amount of memory it is allowed to use.

Linux / Ubuntu:

Using

update-alternatives --config java
Captain Man
  • 5,651
  • 3
  • 41
  • 64
Mateng
  • 3,607
  • 5
  • 35
  • 61
  • 1
    Why would you set XmX to 512m? – IgorGanapolsky Dec 05 '12 at 20:32
  • Running your command in Ubuntu results in the following: "Nothing to configure." – IgorGanapolsky Dec 20 '12 at 09:22
  • @Igor, the heap space size (`-XmX`) depends on your system's memory. When I asked the question, 512m was the optimized value for my old WinXP netbook. Read more here: http://stackoverflow.com/questions/4304312/max-value-of-xmx-and-xms-in-eclipse – Mateng Dec 20 '12 at 10:09
  • I meant running update-alternatives --config java. That is not related to Eclipse.ini – IgorGanapolsky Dec 20 '12 at 15:20
  • Well, "Nothing to configure." means everything's fine. – Mateng Dec 21 '12 at 08:38
  • The tool "update-alternatives" have nothing to do with these settings. If "nothing to configure" appears it means that you have only one java "installed/linked" so you can't choose another installation. Check "man update-alternatives" – xoned Aug 21 '13 at 11:36
48

Another performance boost can be gained by disabling label decorations (Windows -> Preferences; General -> Appearance -> Label Decorations) and by disabling unused capabilities on startup (Windows -> Preferences; General -> Startup and Shutdown).

You may also get additional performance by choosing a different garbage collection strategy depending on your JVM.

If you're fed up with restart cycles you could use JavaRebel from ZeroTurnaround. That will shorten your time spent on server/client restarts.

Vikdor
  • 22,825
  • 9
  • 55
  • 81
ILX
  • 336
  • 4
  • 10
  • 8
    Try DCE VM instead of JavaRebel if you are looking for OpenSource alternative. - http://ssw.jku.at/dcevm/ – KrishPrabakar Jul 25 '12 at 06:46
  • I like that Startup and Shutdown tip. – Christophe Roussy Aug 08 '14 at 08:27
  • 2
    This answer would be more useful if you give a list of which decorators are useful to keep. For me that's at least SVN, and some error decorators. – SPRBRN May 23 '16 at 08:15
  • DCE VM "Note: The latest Java version 1.6 update 26 is not compatible with the DCE VM. All older Java 1.6 versions are supported." – aliopi Jan 05 '18 at 15:41
  • Be careful not to blindfoldedly remove decorations (as i did once and lost some important info like git labels etc. see: https://stackoverflow.com/questions/50861795/eclipse-not-showing-git-repository-status) – JavaTec Jun 14 '18 at 22:18
41

While not directly related to Eclipse:

If you're running Windows 7 (and presumably Windows Vista), be sure to disable the file indexing of your workspace folder if your stuff is is in the default place - your home folder. Windows by default indexes everything in you home folder, and it's normally just a waste for your workspace. (Right click the workspace folder in explorer , Properties -> Advanced.)

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
nos
  • 207,058
  • 53
  • 381
  • 474
  • This technique can be extended even to the whole system disk and other drives too. Best to do it after fresh install, because the process can take more time if you have more files. Right click on the drive you target, on the bottom of the General tab uncheck "Allow files on this drive to have contents indexed in addition to file properties". A recursive process will start which can take a long time, but fruitful in the end. (Although it's very different, but I'd compare this technique with mounting a files system with "noatime" and "nodiratime" option on Linux. That can make a miracle too.) – Csaba Toth Feb 28 '13 at 18:18
  • I would suggest leaving the indexer on in general except you normally don't use the search function embedded in windows. For the workspace it might be good to turn off. – Kami Kaze Mar 27 '18 at 11:24
30

Disable virus scanners, or at least configure any virus scanner to not scan JAR files on read access.

JarHead
  • 1
  • 2
  • 2
29

Eclipse loads plug-ins lazily, and most common plug-ins, like Subclipse, don't do anything if you don't use them. They don't slow Eclipse down at all during run time, and it won't help you to disable them. In fact, Mylyn was shown to reduce Eclipse's memory footprint when used correctly.

I run Eclipse with tons of plug-ins without any performance penalty at all.

  • Try disabling compiler settings that you perhaps don't need (e.g. the sub-options under "parameter is never read).
  • Which version of Eclipse are you using? Older versions were known to be slow if you upgraded them over and over again, because they got their plug-ins folder inflated with duplicate plug-ins (with different versions). This is not a problem in version 3.4.
  • Use working-sets. They work better than closing projects, particularly if you need to switch between sets of projects all the time.

It's not only the memory that you need to increase with the -Xmx switch, it's also the perm gen size. I think that problem was solved in Eclipse 3.4.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Yoni
  • 9,671
  • 9
  • 49
  • 69
27

There is another thing that really speeds up Eclipse on both Windows and especially Linux - putting the JVM in RAM disk.

For Windows you can use the commercial RAM disk driver from Qsoft.

For Linux use any of the methods described in numerous articles on the Internet. It is important to give additional space to the RAM disk that is 10% bigger than the size of the JVM.

Check it out. It really makes a difference.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Darko Miletic
  • 678
  • 1
  • 7
  • 14
  • 6
    Can you clarify? Do you mean to put the target / bin folder on a ramdisk? – nafg Jan 24 '13 at 08:40
  • 4
    you just copy the entire content of JRE or JDK directory once installed to your ramdisk. Than in eclipse.ini you add parameter -vm /jre/bin/server/jvm.dll (windows) or jvm.so for linux – Darko Miletic Apr 16 '13 at 11:38
  • @DarkoMiletic but how would you get it to persist? – StackOverflowed Aug 31 '13 at 02:01
  • 1
    @StackOverflowed 2 options: 1) don't persist it (the JVM doesn't change so you could just copy it manually each time you start the machine), or 2) if using ImDisk like KrishPrabakar recommends a few comments up, there are instructions for persisting here: http://reboot.pro/topic/15593-faqs-and-how-tos/ – Brad Cupit Nov 08 '13 at 15:29
  • 5
    How could that possibly do any difference on a linux machine with a decent amount of ram unless the jvm is flushed out from the cache constantly? Couldn't you just do a `grep -r` or perhaps use `vmtouch` to load the pages into the fs cache? – KarlP Mar 28 '14 at 22:15
  • 3
    1.) Because the Linux swap algorithm is not perfect. 2.) It sacrifices Java performance for performance in other areas. – David Balažic Jul 22 '14 at 12:57
  • 3
    Note that Ubuntu now has a builtin RAM drive at /dev/shm. You can copy your JDK there on boot. 20-30% performance increase. – Dominic Cerisano Jul 15 '17 at 20:31
  • 2
    Based on @DominicCerisano suggestion I wrote a post on medium about this so check it out https://medium.com/@darko.miletic/speed-up-java-on-your-desktop-linux-516a062b2873 – Darko Miletic Aug 07 '17 at 15:57
  • Thanks @Darko.Miletic. Just a note that with the advent of Optane, all storage is becoming RAM drives, which will dramatically improve overall system performance, even Eclipse! – Dominic Cerisano Aug 07 '17 at 22:52
  • 1
    Has anybody tested if this is any better than pre-fetching all the files in JDK to disk cache (e.g. `find /usr/lib/jvm -type f -print0 | xargs -0 wc -l > /dev/null`)? I have hard time believing that putting JVM binaries to tmpfs would improve performance over having contents of those same files in system disk cache. Of course, if you do not have enough RAM, using tmpfs for JVM forces kernel to sacrifice overall performance for JVM. See also: https://unix.stackexchange.com/questions/30286/can-i-configure-my-linux-system-for-more-aggressive-file-system-caching/41831#41831 – Mikko Rantalainen Sep 26 '17 at 07:30
21

I give it a ton of memory (add a -Xmx switch to the command that starts it) and try to avoid quitting and restarting it- I find the worst delays are on startup, so giving it lots of RAM lets me keep going longer before it crashes out.

Captain Man
  • 5,651
  • 3
  • 41
  • 64
Tim Howland
  • 7,646
  • 3
  • 25
  • 45
20

Along with the latest software (latest Eclipse and Java) and more RAM, you may need to

  • Remove the unwanted plugins (not all need Mylyn and J2EE version of Eclipse)
  • unwanted validators
  • disable spell check
  • close unused tabs in Java editor (yes it helps reducing Eclipse burden)
  • close unused projects
  • disable unwanted label declaration (SVN/CVS)
  • disable auto building

reference:making-eclipse-ide-faster

informatik01
  • 15,174
  • 9
  • 67
  • 100
Pakka Techie
  • 672
  • 5
  • 6
14

I also tuned vmargs and stuff. But what really sped up Eclipse on Windows is the "proper" configuration of the anti-virus software. You have to disable the on-demand scanning of packed files. jar files, and many files related to java are packed with PKZIP algorithm to spare space. Because Eclipse uses tons of java files, an anti-virus attempts to individually unpack and scan every one of them. So for Windows platform: turn off the on-demand scanning of packed files, otherwise Eclipse will be unusably slow. Please keep in mind, that disabling this unfortunately makes your system weaker against attacks, most of the malware use packers.

Csaba Toth
  • 8,153
  • 4
  • 62
  • 100
  • 3
    Whitelisting the Eclipse, Java, and Javac exes in Microsoft Security Essentials, really made the biggest difference. Startup went from taking ~3 minutes to less than 30 seconds. – CPrescott Jul 29 '14 at 03:41
  • 2
    That's a very good idea, nowadays I also use solely Microsoft Security Essentials on my Windows installs. White listing is much better than turning off scanning for all packed contents, since malware payload comes in that form also. – Csaba Toth Jul 29 '14 at 22:03
14

One more trick is to disable automatic builds.

Rahul
  • 12,392
  • 13
  • 55
  • 59
14

I implemented a plug-in to configure which features to be loaded in runtime to improve the performance and reduce the conflict among different plug-ins.

You may have installed many features into your Eclipse, such as Android development tools, C/C++ development tools, PHP, SVN, Git and ClearCase plug-ins. Hence Eclipse is heavy and costs a lot of memory, and some of them are not often used.

So you could use my tool to create different runtime policies, such as one that has Android, Git and base Eclipse, another one contains C/C++, SVN and base Eclipse. Next time Eclipse would only load the specified features if you're using the policy that only has Android and Git.

You are welcome to try it and give me the feedback. :)

The name of that tool is Equinox Advanced Configurator.

Divyesh Kanzariya
  • 2,881
  • 2
  • 36
  • 39
Kane
  • 7,392
  • 4
  • 41
  • 66
13

I experienced a considerable improvement in performance when limiting the number of open tabs (in the past I frequently had 30+ tabs open). You can let Eclipse handle this for you automatically:

Window -> Preferences -> Editors -> close editors automatically

8 open tabs is the amount before the >> sign appears, so I tend to leave it at 8.

When opening more tabs, the ones the least recently accessed will be closed.

->When all editors are dirty or pinned

If it has unsaved modifications you can prompt to save & reuse (tab will be closed, a new one will be opened in its place). Or you can open a new editor end thus increase the amount of open tabs (the unobtrusive choice).

If you want to ensure some tabs never get closed autmatically, you can pin them. This by clicking on the pin icon (the rightmost icon in the toolbar, with "pin editor" as tooltiptext).

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Mark
  • 590
  • 7
  • 17
13

Best practices in this thread are implemented in the free Optimizer For Eclipse, from ZeroTurnaround.

What does it help with?

  • Insufficient memory allocation
  • Class verification overhead
  • Excessive indexes and history
  • Obsolete or slow JDK
  • Eclipse being out of date
  • Lengthy build and redeploy times

For more details, check out this article from RebelLabs.

Jevgeni Kabanov
  • 2,592
  • 23
  • 23
13

Not to be underrated is having a fast machine. 16-32 GB of RAM, SSD and a decent processor... and who0o0om there you go.

sanmai
  • 23,569
  • 11
  • 54
  • 73
Vardumper
  • 625
  • 1
  • 9
  • 21
  • 4
    This threads topic is about "Speeding up Eclipse". So I seriously doubt that your suggestion to optimize the IDEs code is of any help here. I do agree though that you do not need the latest system to have decent performance. Did not claim that. My backup laptop (in case something happens to my main laptop) is a 2008 MacBook (non-Pro) with a Core 2 Duo which I did upgrade to 8GB RAM and a 60GB SSD for 100 bucks. That said, this is a 10 year old box which runs macOS High Sierra and Eclipse PDT with a decent performance. Something that would not be the case with the standard 2GB RAM and a HDD. – Vardumper Jan 15 '18 at 06:55
  • iroybot, you are absolutely correct. The topic is about how the end-user can combat the Eclipse developers' apathetic acceptance of incredibly inefficient code. BTW, have you tried NetBeans? It runs beautifully in 2GB of RAM and a HDD. – UncaAlby Jan 18 '18 at 04:28
  • I still having it slow, it takes 20s to start from cold boot eclipse, Is there anyway to make it just take 1s to open everything? – Benyamin Limanto Jun 24 '20 at 09:44
  • What Hardware are you using? Eclipse opens in 7secs on my box, which is a Intel NUC8i7 with 8thgen Coffe-Lake i7-8559U, 64GB of rather slow RAM (2400 MHz), A fast Corsair MP600 NVME SSD drive. And I use openjdk 15.0.1 on macOS. – Vardumper Jan 06 '21 at 18:48
13

Make an effort to configure your build path. Code completion uses a lot of memory if it has to go through your whole project folder.

  • Right click on your project and choose preferences.
  • Choose your build path setting and remove your project folder.
  • Then add only the folders where you have your source code and library code.
Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
7

I've disabled all unused options in Windows > Preferences > General and it has a huge positive impact on performance, eclipse is still slow when switching tabs, I don't want to increase memory, but it's a lot faster when scrolling. Thx for the tips.

7
                       **Tips for making Eclipse IDE Faster**

Eclipse will run faster when working with small projects. But when you have to work with large project, you will get irritated with its speed. Even with a huge RAM you will not be happy with its speed.Below steps will help eclipse to increase its speed

  1. Remove unwanted activation of some of the plugins at start-up by going to windows–>preference–>General–>Startup and shutdown also make sure you don’t use those plugins in any of your views

  2. Disabling label decorations which is of less use for you, will also help you to gain some performance . Go to Windows–>Preference–>General–>Appearance–>Label -> Decorations

  3. Close unwanted projects and use working set option to move from one group of project to another smoothly.

  4. Configure eclipse.ini which will be available in the eclipse installed location.

   Configuring eclipse.ini should be based on your RAM
   -Xms256m
   -Xmx512m
   -XX:PermSize=512m
   -XX:MaxPermSize=512M

Also have a look at http://wiki.eclipse.org/Eclipse.ini for more options to configure eclipse.ini.

  1. Do not keep lot of tabs opened in the editor. Better to have around 20 tabs . Regularly close the unused tabs. To open resource we can always use ctrl+shift+R and ctrl+shift+T (java resource) instead of opening lot of tabs I experienced a considerable improvement in performance when limiting the number of open tabs (In the past I frequently had 30+ tabs open). You can let eclipse handle this for you automatically: Window->Preferences->Editors-> close editors automatically 8 open tabs is the amount before the >> sign appears, so I set 14 as my default value. When opening more tabs, the ones the least recently accessed will be closed. When all editors are dirty or pinned. If it has unsaved modifications you can prompt to save & reuse (tab will be closed, a new one will be opened in its place). Or you can open a new editor end thus increase the amount of open tabs (the unobtrusive choice). If you want to ensure some tabs never get closed autmatically, you can pin them. This by clicking on the pin icon (the rightmost icon in the toolbar, with “pin editor” as tooltiptext).

  2. Go to Windows -> Preferences -> Validation and uncheck any validators you don’t want or need.

  3. Go to Windows -> Preferences -> General -> Appearance -> and uncheck any animation you don’t want or need.

  4. Go to Windows -> Preferences -> Maven and check 'do not automatically update dependencies'.

drac_o
  • 161
  • 1
  • 11
Sudhakar
  • 2,738
  • 1
  • 24
  • 29
6

Try this too, it will improve the performance:

cleaning up indexes - {workspace path}.metadata.plugins\org.eclipse.jdt.core cleaning up history - {workspace path}.metadata.plugins\org.eclipse.core.resources.history

Cleaning the above folders will not impact the project files.

Harshal Patil
  • 6,284
  • 8
  • 37
  • 55
Krishna
  • 6,706
  • 15
  • 64
  • 79
5

On Windows 8. Open Control panel. Find Windows Defender. Go to settings Exclude all folders where is your Spring/Eclipse and workspace

Milos
  • 56
  • 2
  • 8
5

Well, if you are developing a GWT application using Eclipse, then this is the way:

Out of memory error in Eclipse

Also remember to add the same VM arguments to the hosted mode configuration.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
dinesh
  • 41
  • 1
  • 2
5

If you use Maven and ivy do check out their consoles in case they are hogging processing during builds. I use ivy and on top of that I have certain JAR files (internal) changing with same version, so it has to workout all the time to fetch them.

If you have defined you project on a network drive then you will also experience lag during build/read/write type of processes.

  • Disable/uninstall plugins you don't need.

  • Close perpective that you don't need

  • Close unused database connections

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Yogi
  • 328
  • 3
  • 7
5

Apart from configuring eclipse.ini for memory usage. I have configured by "Start up & shutdown options". My Eclipse is blazing fast now.

enter image description here

Manjeet
  • 687
  • 13
  • 20
  • Some details would be of interest: When are those plugins enabled now? On first usage or need to be enabled manually and can't be used in your setup over the lifetime of a running instance? If automatically, does one recognize lags whenever the plugin is first used? – Thorsten Schöning Jan 16 '19 at 08:26
  • @ThorstenSchöning - These plugins comes enabled by default. You can always enable & disable them manually based on your preference. Please note that, with above option, you are not removing your plugins, but only disabling them on start-up, so that eclipse would be loaded fast. – Manjeet Jan 17 '19 at 09:20
5

In special cases, bad performance can be due to corrupt h2 or nwire databases. Read Five tips for speeding up Eclipse PDT and nWire for more information.

Where I work, we are dependent on a VM to run Debian. I have installed another Eclipse version on the VM for testing purpouses, but this sometimes creates conflicts if I have the other Eclipse version running. There is a shared folder which both of the Eclipse versions shares. I accidentally left the Debian Eclipse installation running in the background once and that gave me corrupt database files.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
4

Try these. There are two ways.

First Procedure

Refer this article.

http://www.javacodegeeks.com/2014/06/the-real-way-to-make-eclipse-run-faster-on-ubuntu.html

Second Procedure.

Execute the command in the terminal.

ramdisk

to get better performance and fast response for Ubuntu.

Ramdisk is part of system memory. Ubuntu by default uses a half of physical memory (RAM) as ramdisk, and it is mounted onto

/dev/shm

, it can be used just like normal disk space (create files and folders and manipulate them with better performance rather if they were stored on the hard disk). If ramdisk uses more than a half of RAM, data will be moved into the swap space. If ramdisk uses less, the remaining can still do what RAM’s doing.

Set upper limit of ramdisk

As is said above, ramdisk by default can use a half of RAM. If you want to change the upper limit, follow the steps below:

  1. Edit /etc/fstab by your favourate editor:

    gksudo gedit /etc/fstab

  2. Find this line and change to make it looks like this(add this line if not exist, and change 512M to what you like.):

    tmpfs /dev/shm tmpfs defaults,size=512M 0 0

  3. Reboot or re-mount

    /dev/shm

Mount /tmp onto ramdisk

To make it easy to use, you can mount a directory into

/dev/shm

by following commands:

mkdir /dev/shm/tmp

chmod 1777 /dev/shm/tmp

mount --bind /dev/shm/tmp /tmp

Dulith De Costa
  • 8,429
  • 1
  • 53
  • 43
  • in ubuntu 15.4 this is so good thing if you have 8 gb ram at least. My other programs become more faster after this operation. Thx a lot :) – kodmanyagha Jul 28 '16 at 14:31
4

The only real way to hasten Eclipse with the standard plug-ins is to give it more memory and in some cases access to a faster storage space / defragmented hard drive.

Beyond that there is not much you can do performance-wise: most standard plug-ins do not have a continuous runtime cost, even Mylyn is relatively fast.

Upgrading to the latest JVM supported on your machine may help as well.

Some people downgrade to older Eclipse versions to get better performance. It may also make sense to use Eclipse classic instead of the official releases.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Uri
  • 84,589
  • 46
  • 214
  • 312
  • Though it's not recommended to manually remove plugins managed by p2, I find a regular plugin cleanup greatly improves performance and postability, especially if you have a master eclipse configuration copied and shared with multiple developers. In that case it's better to just archive the master eclipse install instead of relying on everyone to update their configs in synch. see http://stackoverflow.com/questions/221476/how-to-remove-old-versions-of-eclipse-plugins – FKorning Jul 16 '13 at 19:13
3

Close the outline view to speed up switching between editors.
Each time you switch to a different tab or open a file, the outline view has to update, which on my machine took about 1 second every time. It's just 1 second, but if you change tabs very often, like me, it will save you a headache.

user717572
  • 3,526
  • 7
  • 32
  • 56
3

A few steps I follow, if Eclipse is working slow:

  1. Any unused plugins installed in Eclipse, should uninstall them. -- Few plugins makes a lot much weight to Eclipse.
  2. Open current working project and close the remaining project. If there is any any dependency among them, just open while running. If all are Maven projects, then with miner local change in pom files, you can make them individual projects also. If you are working on independent projects, then always work on any one project in a workspace. Don't keep multiple projects in single workspace.

  3. Change the type filters. It facilitates to specify particular packages to refer always.

  4. As per my experience, don't change memory JVM parameters. It causes a lot of unknown issues except when you have sound knowledge of JVM parameters.

  5. Un-check auto build always. Particulary, Maven project's auto build is useless.

  6. Close all the files opened, just open current working files.

  7. Use Go Into Work sets. Instead of complete workbench.

  8. Most of the components of your application you can implement and test in standalone also. Learn how to run in standalone without need of server deploy, this makes your work simple and fast. -- Recently, I worked on hibernate entities for my project, two days, I did on server. i.e. I changed in entities and again build and deployed on the server, it killing it all my time. So, then I created a simple JPA standalone application, and I completed my work very fast.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Sun
  • 2,824
  • 5
  • 45
  • 70
2

I have tried many permutations by increasing heapspace and changing the garbage collector settings to speed up Eclipse.

But for my local development, in my humble opinion, I have seen that disabling the JVM garbage collector works best for me.

Mylyn autocomplete feature works with no issue and the (Not Responding) part has been significantly minimzed.

Below is a snapshot of my eclipse.ini file.

-vm
--C:\JAVA\jre\bin\server\jvm.dll
C:\JAVA8x64\jre\bin\server\jvm.dll
-vmargs
-Xnoclassgc
-Dosgi.requiredJavaVersion=1.6
-Xms256m
-Xmx1024m

I have tried using JDK 6 and JDK 8, and in both cases, noticed a significant speedup.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Saikat
  • 448
  • 4
  • 12
2

This article How to quickly make eclipse faster is very useful. I tried some tips and it's true; it made my Eclipse run faster.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Spartan
  • 1,029
  • 4
  • 19
  • 37
2

The problem could be java cache, or java temporary files.

Open control panel on windows, find Java panel Click Settings on General tab, Delete temprorary files, and set amount of disk space for storing temporary files od 10000MB or less. Restart eclipse. Restore all validators and you will see that speed your IDE Eclipse is ok.

Milos
  • 56
  • 2
  • 8
  • IMPORTANT. If you use Windows 64bit, extract eclipse to c:\Program files, and configure Windows Deffender to exclude Eclipse / sts folder and exclude program. If you extract it to some other folder your eclipse will work as 32bit application. – Milos Jul 13 '15 at 22:28
2

There is once more solution Delete all files from this two folders

.metadata.plugins\org.eclipse.core.resources.history .metadata.plugins\org.eclipse.jdt.core

This help for the first momment. But it still stay slow

Milos
  • 56
  • 2
  • 8
2

I had similar slowdown and this fix applies only if you are using the C/C++ variant of the Eclipse. For C/C++ you may want to disable the indexer which is famous for CPU hog. It is the equivalent of VS intellisense. To disable CDT indexer go to Window->Preferences, underC/C++ tab select Indexer and uncheck the Enable indexer.

zheek
  • 722
  • 1
  • 11
  • 22
Rxp
  • 1
  • 3
2

We use GIT as CVS and gradle as build tool.

Symptom

In my case one specific project with > 20'000 files froze using hierarchical view when navigating a directory with a lot of files.

Fix

  1. Create new Eclipse workspace
  2. Freshly clone the project into the Eclipse workspace
  3. Import project into Eclipse (in our case using Gradle import)
Peter Keller
  • 6,746
  • 2
  • 20
  • 23
1

If you're not bound to Eclipse for reasons like work, some plug-in\functionality you need that's only available through Eclipse and so forth; then one a possible strategy is to get rid of Eclipse altogether. This will speed up things tremendously.

You could switch to any other IDE or development environment that does what you need. One example would be NetBeans. Some proposed speed-ups also apply to NetBeans, or any other IDE for that matter.

One example that applies directly to Linux, is to move as much as possible to a tmpfs mount. For Java development in NetBeans, I've moved the Java documentation and source to a tmpfs mount which resulted in an enormous performance boost.

Likewise, during C++ development I'll make sure the whole source tree is in my tmpfs mount if possible. Although I haven't extensively benchmarked build performance, a few tests on a reasonably sized codebase (few hundred source files + headers) resulted in a >50% decrease in compilation time.

Do keep in mind that your data will not persist during a power loss when using this method. To combat this, one could create a script that rsyncs the tmpfs mount to some backup-directory and add that script as a cronjob that runs every minute.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
pauluss86
  • 424
  • 6
  • 8
  • 2
    What rubbish. Switching to a text-editor loses all the (huge) productivity advantages of an IDE, switching to NetBeans.. is just another IDE, having it's own performance issues. – Thomas W Jul 30 '14 at 05:05
  • Ramdisks/ scheduled jobs actually are available on many platforms. Great for performance, but this is a "tinkerer's solution" -- and should only be used if you're willing to write & test the scripts, to make it (at least somewhat) durable against powerloss. Probably better to spend your time=money on a better out-of-the-box solution; an SSD. – Thomas W Jul 30 '14 at 05:11
  • 1
    @ThomasW Firstly, where am I suggesting of not using an IDE? From my answer: _You could switch to any other IDE or development environment that does what you need._. For _my own_ purposes at least NB performs better than Eclipse, at least since last time I tried Eclipse; regardless of using an SSD/ramdisk. Regarding your last comment: I agree completely, but that's a different matter altogether; it was just a suggestion. Lastly, the stated compilation speedup I observed is in comparison to my compiling from my SSD. – pauluss86 Aug 09 '14 at 14:50
  • All IDEs have warts, wrinkles and trap you in a canned workflow. The beauty of Eclipse is that it is NOT an IDE. It is a framework for building custom IDEs and optimized workflows. – Dominic Cerisano Jul 15 '17 at 20:24
1

Increase your RAM to more than 8 GB and disable autobuild project. This worked for me.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
0

There could be several things that could delay the start and exit of eclipse. One of them is like familiar to what we have a lookalike in Windows. Disabling the windows animations and disabling startup activities speeds up windows to certain extent

Similar to what in eclipse we can have the same thing Windows-> General -> Preferences -> Appearance -> Turning OFF some decorative options. This would give a little boost but may not have much impact.

In my opinion, the projects in the work space you might have created should be limited to certain extent or rather creating a new work space if projects are more. For instance, when you try to run a single project on server it takes less time as compared to running several projects on the same server

Himanshu Ahuja
  • 2,849
  • 2
  • 5
  • 25
0

For Windows users:

If you go to Task Manager, choose the eclipse application, and click on the little arrow next to it, you will usually just see one sub-process appear below "eclipse.exe". However, in my case, if you have multiple instances of "Java Platform SE Binary", then end all of them. For some reason, I had three of these running in the background, even though I wasn't currently running any projects. Nevertheless, this will boost performance back to the way it likely was when you first installed eclipse on your computer.

If you can no longer run a project after the change, then try relaunching eclipse.

0

Do you have a huge ram? Create a ramdisk and place there your

  • JDK
  • JVM
  • Eclipse
  • Workspace

Make sure you persist your changes back to your HDD or commit them to VCS to avoid data-loose on power-off.

Grim
  • 4,939
  • 8
  • 46
  • 97