开发者

Hints to improve Eclipse performance

开发者 https://www.devze.com 2023-02-24 08:08 出处:网络
Working in Eclipse with big projects can be painful because of IDE works slowly, sometimes stops and doesn\'t respond. I know it can depends on OS, version of Eclipse etc.

Working in Eclipse with big projects can be painful because of IDE works slowly, sometimes stops and doesn't respond. I know it can depends on OS, version of Eclipse etc.

All eclipse developers have tricks which tuning workspace in Eclipse, What should be turn off to improve performance the IDE?

For example: My project has the recommendation to turn off xml validations, don't install m2eclipse.

Because of eclipse's performance some devs use I开发者_开发技巧ntelliJ.

UPDATED: For these who feel uncomfortable with the eclipse's performance I suggest to try other solutions just to have comparison - I tried and this was the best what I've done in performance subject :)


  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. Eclipse is not a word processor. Better to disable the spell check. Disabling spell check will reduce the eclipse burden by going to Windows-->Preference-->General-->Editors --> Text Editors-->Spelling

  3. When eclipse builds the project, it will delete all output folders and rebuild classes built by other compilers. We can disable such features, as deleting the output folders and rebuilding will take sometime. Goto Windows-->Preference-->Java-->Compiler-->Building

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

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

  6. You could also disable Eclipse automatic building, if it is not needed for you. Goto Project-->Build Automatically (uncheck it)

  7. 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

  8. Disable unwanted plugins. Full J2EE eclipse version has an option to disable/uninstall plugins. Goto Help-->Software Updates-->Manage Configuration. Right click on any installed plugin to get disable option. If this option is not available then enable Classic Update by going to Windows-->Preference-->Capabilty and check classic update. Now the manage configuration option should be available in help menu


I'm an intelliJ user though occasionally peep into eclipse since I like to use it. Couple of things you can try which my work colleague pointed to are

  • Show the heap status (General -> Show heap status) can keep an eye on memory and hit the button to clear!

    Hints to improve Eclipse performance

  • In project properties set the default output folder to be outside of the target

  • Workspace options, unchecking build automatically (build in the background as soon as you hit Save (Ctrl+S)), refresh automatically & save auto before build. You may have you own preferences but can give it a try.
  • Show sleeping/hidden tasks to see whats going on underneath?

You must have already tried giving it more memory I guess. Hopefully it will improve.


  1. Ensure you have enough memory and that Eclipse is actually using it (add -Xms -Xmx arguments at Eclipse start).
  2. Remove all plug-ins, you dont use.
  3. Create separate workspace for projects you change rarely and include them as JARs to your primary project.
  4. Use debug mode only when you are debugging (it is slower and uses more memory).


Put all validators (preferences > Validation) to 'Manual' and deselect 'Build'.

Also, consider using an external svn client (like Tortoise) instead of an eclipse plugin like subclipse:

Subclipse consumes so much system resources and effects eclipse performance greedily in big projects. If you could, consider not to use subclipse especially in projects that contain thousands of code kept in subversion source repository. It's really become a very heavy-weight plug-in with heavy-weight code.


Add the source and output directory trees to your Virus Scanner's exclusion list.


1.Disable unecessary validations and startup action in eclipse reference.

For validations: on eclipse menu Windows -> Preferences -> Validation, click “Disable All”, and then select the validator which you need. I selected “Classpath Dependency Validator” only.

For startup action: on eclipse menu Windows -> Preferences, type “startup”, select “Startup and Shutdown”, untick the options you don’t need.

2.Modify eclipse.ini(set the Xmn(new generation size), Xms and Xmx, enable parallel GC) Change or add the following settings given below

-Xmn128m

-Xms1024m

-Xmx1024m

-Xss2m

-XX:PermSize=128m

-XX:MaxPermSize=128m

-XX:+UseParallelGC


If you have a lot of projects open, it might help to close unused projects. It helps a lot, as Eclipse does not have to provide all the memory model required for content assist.


Disable 'Build Automatically' in the Project menu and set up a key binding for Build Project instead, e.g. CTRL + B. I've tried so many different things to improve Eclipse performance, but this is the only one that really works for me.


Getting slow performance usually is a problem of one or more badly implemented plugins. Identifying the bad plugin and uninstalling it normally removes the bad performance (of course if you realy NEED the plugin you are out of luck ;) ).


I am debugging a large program containing lots of breakpoints. I have heavily increased Eclipse's performance while debugging by disabling the breakpoints at startup, and only enabling them again just before I need them.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号