Archive for August 31st, 2008

31st Aug 2008

Tweaking Eclipse

Eclipse is a very powerful editor, but let’s face it. It can be slow. Recently I have been doing some research into some ways I can get the thing to speed up a little and I thought I would share what I have found. As it turns out, the most detailed description I have found is in a book I own on Flex –
Flex Solutions : Essential Techniques for Flex 2 and 3 Developers by Marco Casario. It basically mirrors the resources I found online, but has more details in regards to what settings to try for particular amounts of memory.

In order to apply some of these tweaks, you will be editing the INI file for Eclipse. This file is named eclipse.ini and can be found in the root directory of wherever you installed Elcipse (e.g., C:\Program Files\eclipse).

Lets start with those tweaks first and then move on to some of the other settings you can play with once you have Eclipse open.

Once you have located the eclipse.ini, make a back up copy of it in case you need to reference to your original settings. Once you have done that, open elcipse.ini in you text editor of choice.

The default contents of my ini file looked like this:


We are interested in the stuff after the -vmargs. These are the arguments that Eclipse passes to the Java Virtual Machine. By tweaking these settings, we can do things like manage the amount of memory allocated to Eclipse. To apply the tweaks, we are going to modify some of the existing arguments and add a few new ones. For the ones we add, place them at the end of the file after the -vmargs flag. If you are interested in what the specific arguments mean, go here as I am not going to go into that level of detail.

Here are the recommended settings by amount of RAM.

512 MB RAM:






Save the file.

Now we can move onto some of the things you can do once you have eclipse open.

Those of you who use Eclipse know that it has a good error checking system. However, that robustness comes at the cost of speed. Once of the things that Eclipse does is scans through the workspace to check for errors. If you have a large workspace with a lot of projects this can take quite some time. To keep Eclipse from doing this scan each time you save a file, disable the Build Automatically option (Window>>Preferences>>Workspace). If you need error checking, you can turn it back on right before you are going to do a release.

Once of the other things you can do is close any projects that you are not using. That way Eclipse does not have to keep track of them.

Finally, we can apply the same idea to files. For each file that you have open, Eclipse has to track it an allocate memory. Close files that you are not working on and as a further step you can actually limit the number of files that Eclipse will allow you to have open in the preferences dialog (Window >> Preferences >> General >> Editors)

Posted by Posted by Jeremy Wischusen under Filed under Eclipse Comments No Comments »