89

What is Eclipse doing when building workspace process is running? Can i disable it because it is taking a long time to complete and i dont know if it is necessary. Thank you

The Lazy Hiker
  • 1,553
  • 2
  • 11
  • 8

4 Answers4

106

Building workspace is about incremental build of any evolution detected in one of the opened projects in the currently used workspace.

You can also disable it through the menu "Project / Build automatically".

But I would recommend first to check:

  • if a Project Clean all / Build result in the same kind of long wait (after disabling this option)
  • if you have (this time with building automatically activated) some validation options you could disable to see if they have an influence on the global compilation time (Preferences / Validations, or Preferences / XML / ... if you have WTP installed)
  • if a fresh eclipse installation referencing the same workspace (see this eclipse.ini for more) results in the same issue (with building automatically activated)

Note that bug 329657 (open in 2011, in progress in 2014) is about interrupting a (too lengthy) build, instead of cancelling it:

There is an important difference between build interrupt and cancel.

  • When a build is cancelled, it typically handles this by discarding incremental build state and letting the next build be a full rebuild. This can be quite expensive in some projects.
    As a user I think I would rather wait for the 5 second incremental build to finish rather than cancel and result in a 30 second rebuild afterwards.

  • The idea with interrupt is that a builder could more efficiently handle interrupt by saving its intermediate state and resuming on the next invocation.
    In practice this is hard to implement so the most common boundary is when we check for interrupt before/after calling each builder in the chain.

 

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • See also this thread as an example of successful eclipse reinstallation: http://dev.eclipse.org/newslists/news.eclipse.webtools/msg08521.html – VonC Mar 24 '10 at 05:02
  • 1
    This answer is not correct. Project -> Build Automatically has always been unchecked yet it still randomly decides to refresh the workspace, completely preventing me from doing anything in this gigantic codebase that I can't pare down in the time that I have to complete tasks for clients. – Spencer Williams Sep 26 '16 at 18:40
15

You can switch to manual build so can control when this is done. Just make sure that Project > Build Automatically from the main menu is unchecked.

Chry Cheng
  • 3,378
  • 5
  • 47
  • 79
4

if needed programmatic from a PDE or JDT code:

public static void setWorkspaceAutoBuild(boolean flag) throws CoreException 
{
IWorkspace workspace = ResourcesPlugin.getWorkspace();
final IWorkspaceDescription description = workspace.getDescription();
description.setAutoBuilding(flag);
workspace.setDescription(description);
}
taitelman
  • 612
  • 5
  • 9
0

For anyone running into a problem where build automatically is unchecked but the project is still building. Make sure your project isn't deployed to the server in the server tab and told to stay synchronous.

tw0shoes
  • 167
  • 2
  • 8
  • Worth briefly mentioning how to determine whether the 'told to stay synchronous' is in effect - i see no mention of this in my servers tab, for example, nor when I check the properties context menu on the server.. – Razzle Nov 21 '19 at 16:08