DESCRIPTION

Don't run ResourceRefreshJob as Workspace job to avoid resource events

ResourceRefreshJob is triggered each time user activates Eclipse window,
even if there are no Git configured projects in the workspace and no
changes in configured Git repositories.

Unfortunately even if the job detects that it has nothing to do, it
*always* triggers workspace change events and autobuild job executions.
ResourceRefreshJob is a subclass of InternalWorkspaceJob, so just via
entering runInWorkspace() method a sequence of calls below is always
executed:

workspace.prepareOperation()
workspace.beginOperation()
workspace.endOperation()

The last one always dispatches ResourceChangeEvent to all
IResourceChangeListener's and so triggers also auto build job (which
usually simply doesn't do anything). Although I have no example how it
can cause real harm in production environment, alone debugging the build
process in Eclipse is impossible because of permanent interruptions from
ResourceRefreshJob.

Change-Id: Idc23fd3cf4d71d36b16af2d4855770a4b70927cd
Signed-off-by: Jayvion Booth xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2015-09-01 08:51:27.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/7498/

-------------------------------------
author: Brenden Conley
date: 2015-09-01 09:12:48.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7498/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2015-09-01 09:41:00.000000000

Patch Set 2: Code-Review+2

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-09-01 09:41:06.000000000

Change has been successfully merged into the git repository by Jayvion Booth

-------------------------------------
author: Hailee Weiss
date: 2015-09-01 13:02:59.000000000

Patch Set 2:

Hallo Andrey,

I know this might not be the best place to write this commment, but I'll try it anyway.
I think I also discovered some scenario that triggers continues refreshes. When I do a rebase, it takes ages to finish compared to the same operation on the command line. I think (but I might be wrong) it has to do with permanent refreshes/rebuilds after each commit that gets merged/rebased.
Maybe what you did in this change can be extended to that use case?

thx Michi

-------------------------------------
author: Jayvion Booth
date: 2015-09-01 16:28:07.000000000

Patch Set 2:

> Hallo Andrey,
 > 
 > I know this might not be the best place to write this commment, but
 > I'll try it anyway.
 > I think I also discovered some scenario that triggers continues
 > refreshes. When I do a rebase, it takes ages to finish compared to
 > the same operation on the command line. I think (but I might be
 > wrong) it has to do with permanent refreshes/rebuilds after each
 > commit that gets merged/rebased.
 > Maybe what you did in this change can be extended to that use case?
 > 
 > thx Michi
Michael,
I'm not aware about your particular problem. Best you can do is to report a bug if you can reproduce it. We can continue discussion on the new bug.
Regards,
Andrey

-------------------------------------
