How To Solve Eclipse Building Workspace Too Slow Problem

When you develop java project use eclipse, you may find that eclipse project run so slowly, this can even stop your work, you can do nothing but wait for eclipse project build or download maven jar files. This article will tell you some tips about how to avoid eclipse run slowly issue.

1. Uncheck Project Auto Build.

If you check the project auto build menu item, the project will build automatically every time when you change source code. This can slow down your project coding process extremely. So please remember do not check Build Automatically menu item. Below is the steps to disable auto build for eclipse project.

  1. Click Project menu item at top menu bar.
  2. Click the Build Automatically sub menu item to check or uncheck it.
    eclipse project auto build menu item

2. Increase Eclipse Used Memory Size.

Eclipse used maximum and minimum memory size is configured in eclipse.ini file. You can find this file in eclipse installed directory. If you use eclipse on MacOS, there is something different, you can read article How To Change STS Eclipse INI File On MacOS to learn how to change it’s content for MacOS.

To make your eclipse project build faster, increase the eclipse used maximum memory size is a method. Below is the steps.

  1. Open eclipse.ini file.
  2. Add or change below data.
    -vmargs -Xms256m -Xmx512m

3. Reduce Auto Startup Plug-in Number After Eclipse Startup.

If you reduce auto startup eclipse plugins number, this can save a lot of time when eclipse startup.

  1. Click Eclipse —> Preferences ( MacOS) or Window —> Preferences ( Windows ) menu item to open eclipse preferences dialog.
  2. Then you can select the plugins that you want to be activated on eclipse startup.
    eclipse preferences startup and shutdown plugins
READ :   Manage Maven Project Using Eclipse

4. Reduce Build Process Required Validators To Speed Up Compilation.

In development, when you find the eclipse workspace build process are slower and slower, if the main reason is because validating static files for example JS, CSS, XML file and so on. Then you need to reduce or remove the validators in eclipse preference validation section.

  1. Open eclipse preferences dialog.
  2. Click Validation menu item in left panel, then you can enable or disable related validator by select/deselect checkbox in the Build column in right panel.
    enable or disable eclipse project validator

5. Exclude JS Files From Validation.

If there are big js files exist in your java project, and you do not want to validate the js file content, you can exclude the js files from validate it.

  1. Right click the eclipse java project, click Properties menu item in popup menu list.
  2. Click JSHint menu item in left panel, then add excluded js files or folders that do not need validation in right panel.
    edit eclipse jshint to exclude js files from validation

6. Remove .metadata Folder Or Create A New Eclipse Workspace.

If you find that your eclipse workspace runs still very slower after trying all above methods. You can use this final method to resolve the eclipse project run slow issue.

Each eclipse workspace has a .metadata folder, the folder is used to store eclipse and project configuration data such as eclipse plugins when startup or shutdown. If you remove the .metadata folder, eclipse will create a new one when it startup again. And all the settings in old .metadata folder will be removed.

So you can make your eclipse project far away from hanging by following two methods.

  1. Create a new workspace and import all exist project into it.
  2. Close current workspace and delete the .metadata folder under current workspace and open the workspace again in eclipse to create a new .metadata folder.
  3. If you look into the .metadata folder, you can find there is a .log file in it. You can find the detail reason of why eclipse slow down or crash from the logging data in this file.
(Visited 75 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.