BreadcrumbHomeResourcesBlog How To Speed Up Eclipse In a Few Clicks March 12, 2015 How to Speed Up Eclipse in a Few ClicksJava ToolsDeveloper ProductivityBy Simon MapleEclipse is the market leading IDE of choice for Java developers. It’s a rich featured IDE which makes developing code in Java super simple. However, we’ve all had moments where Eclipse was very slow and not responding. Maybe you've even thought to yourself, “Wow, my Eclipse is slow today, what’s it doing?”. To be honest, there's no clear answer. That said, here are some tips and tricks to make your Eclipse IDE run faster if it's slow or unresponsive. Table of ContentsHow Can I Speed Up Eclipse?Insufficient Memory AllocationClass Verification OverheadExcessive Indexes and HistoryObsolete or Slow JDKTable of Contents1 - How Can I Speed Up Eclipse?2 - Insufficient Memory Allocation3 - Class Verification Overhead4 - Excessive Indexes and History5 - Obsolete or Slow JDKBack to topHow Can I Speed Up Eclipse?Here are the topics which are the typical culprits when working out what might be slow on your Eclipse environment.Insufficient memory allocationClass verification overheadExcessive indexes and historyObsolete or slow JDKEclipse being out of dateLengthy build and redeploy timesEach of these areas can afflict different amounts of pain to different developers, based on how long you’ve used the installation for, your type and number of projects. Let’s go through each one individually and show you how you can fix them. Remember, your milage may vary.Back to topInsufficient Memory AllocationThis might seem obvious, but Java applications are rarely tuned with reasonable Java memory settings from the outset and you’d be well advised to change yours to reduce constant heap expansion which really slows general startup and running down. Your settings will of course depend on your detailed environment, but here are some suggested settings which will give you a much more performant environment from the outset:-server -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+UseParallelGC -Xms512m -Xmx1024mThere’s also a +UseParallelGC flag used to dictate which garbage collector strategy to use. This strategy minimises the garbage collection pause, meaning the time spent garbage collecting is reduced as much as possible.Back to topClass Verification OverheadClass verification is where the JVM sifts through your class files when they’re loaded and verifies that class data is not corrupt or invalid. This is only really important if you’re manipulating byte code anyway. Plugins also go through the same checks and this can be a big overhead. We’re talking 10-20% startup improvement.So how can you fix it? Well, you need to use the -Xverify:none option on your JVM, which disables class verification.Back to topExcessive Indexes and HistoryI remember being at school, sitting in my history class thinking... Wow, this is incredibly boring. Well, Eclipse history is just as boring, and it has the same effect too. It manages to make time feel longer than it actually is. Eclipse stores a bunch of info in indexes and history which build up over time. It stores them in two directories as follows:{workspace path}/.metadata/.plugins/org.eclipse.jdt.core{workspace path}/.metadata/.plugins/org.eclipse.core.resources/.historyEclipse spends a lot of time going through these files and if you have excessive build up in these directories, you could be experiencing a lot of churn around start up and general running. It’s important to clean up your history and indexes periodically.Back to topObsolete or Slow JDKThe latest version of Java available today is Java 21. You know that right? Thought so, just checking. Big performance improvements are made in each version of Java when new versions are released and it just makes sense to upgrade, if possible. Of the available (non-beta) Java releases out today, the Oracle JDK looks to be the most performant and so is recommended for use with Eclipse.Java 21 is full of new features to make all Java IDEs faster and more performant, including Eclipse. Learn more in this webinar. Watch nowEclipse Being out of DateThere are a number of reasons why being on a recent version of Eclipse is important. Firstly, and least importantly, it’s super shiny and you’ll make all your friends and colleagues feel jealous and old fashioned when they realise their Eclipse version isn’t named after a popular chocolate bar. Secondly and more importantly, the Eclipse foundation do put a lot of work in to make Eclipse more performant, so you may as well make use of these enhancements in the newer versions.Plugins tend to be written and updated for the more recent versions, so you’ll soon potentially find yourself in a poorly performing environment, and remember, not all plugin updates will even support a lot of the older versions of Eclipse. Obviously, if you’re running and stuck on a legacy plugin which you depend on, and it doesn’t support a newer version of Eclipse, this may not be an option for you, but this is quite rare.Lengthy Build and Redeploy TimesWe of course know that one of the major pain points when developing applications in Java is having to build, compile, package, restart/redeploy, generate state, ZZzzzzz. And all this before you can even think about testing or seeing your code changes.Well, there’s no need to worry or grow old beyond your years as there is a solution. It wears a cape, and goes by the name of JRebel. A tool which has a deep integration with Java Classloaders, application servers and Java frameworks that allow you to instantly reload your code changes!JRebel can help you save upwards of 10% development time annually in all popular IDEs, including Eclipse. See how much time you could save during your 14-day free trial. Try JRebel for FreeAdditional ResourcesLooking for additional reading on Eclipse and other Java IDEs? Be sure to check out these resources for added insights:Blog - Add Custom Install Actions to EclipseBlog - Eclipse vs. NetbeansBlog - Using Eclipse for Java DevelopmentBack to top
Simon Maple Ex-Director of Developer Relations, JRebel Simon Maple was the Director of Developer Relations at ZeroTurnaround.