Eclipse performance tuning:
Improving the performance of eclipse is very essential for Java developers. One or the other day, the eclipse might turn very slow and you may be having a hard time in your development. By making small changes to the settings we can make eclipse to perform considerably fast.
Here are the few tips to improve the performance of eclipse:
- Disable unnecessary validations
On eclipse menu go to Windows -> Preferences -> Validation, click “Disable All”, and then select only the validators which you need. Refer screen below.
- Disable unnecessary plug-ins that activates during startup.
On eclipse menu go to Windows -> Preferences, type “startup”, select “Startup and Shutdown”, uncheck the plugins you don’t need to be activated during startup.
- Disable label decorations
Another performance boost can be gained by disabling label decorations (Go to Windows -> Preferences->General -> Appearance -> Label Decorations)
- Change the theme to Classic and disable animations.
- Eclipse configuration file changes. Do the following in the eclipse.ini file.
1. Add -Xverify:none to your eclipse.ini. It will cut down your eclipse startup time considerably. This will tell the JVM not to validate all the .class files it is loading. This means JVM won’t be able to detect the authenticity of the class files you are using. This poses a security threat if the byte code have been altered. Refer link to understand more.
2. To increase permanent generation space (where new objects are allocated) add,-XX:PermSize=512m
3. To increase minimum and maximum heap size (which includes young and tenured generations) add,
Note: You should always allocate size less than your original RAM size.
4. Use XX:+UseParallelGC
This indicates which garbage collector strategy to use. This strategy minimizes the garbage collection pause, meaning the time spent garbage collecting is reduced as much as possible. Read more (http://www.javaperformancetuning.com/news/qotm026.shtml).
- Disable spell checking if you don’t want. Go to General > Editors > Text Editors > Spelling-> Disable spell checking
- Go to Window > Customize Perspective > Remove the tool bars and menus that you don’t use or want (how many times have you printed a source file?.)
- To open xml files faster, add *.xml under Windows -> Preferences->General->File associations and then select XML editor as default. Do this for other file types like html etc.
- Java developers working in maven project might find that whenever you open the pom.xml file it always shows the overview section by default and then you need to click the pom.xml section. We can change this to open the pom.xml contents directly instead of showing the overview section. To do this, go to Window > Preferences > Maven > User Interface then check “Open XML page in the POM editor by default”. Now whenever you open a pom.xml file it will show the pom.xml contents directly.
Hope you find these tips useful. If you find any other tips, kindly post it in comments section.
Latest posts by Uday (see all)
- How to run shell commands using SSH connection in Java - July 26, 2017
- Java program to print rectangle of stars - July 20, 2017
- Introduction to Java Enum data type with example programs - March 31, 2017