DESCRIPTION

Change usage of SubProgressMonitor to SubMonitor in
org.eclipse.egit.core

SubProgressMonitor has bad performance characteristics and SubMonitor
was offered 2007 as replacement for it. Platform recently deprecated
SubProgressMonitor and continues to improve performance of SubMonitor

For the core.internal.util and core.project packages. Other packages
will be done in separate Gerrit reviews, planned for the next Eclipse
Hamburg Hackathon.

Bug: 477695
Change-Id: I6b63b52daaf07ef55428fc6999d492de70307027
Signed-off-by: Zaid Mosley xxx@xxx.xxx

COMMENTS

author: Brenden Conley
date: 2015-09-18 08:38:13.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2015-09-18 09:01:57.000000000

Patch Set 3: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2015-09-19 12:16:47.000000000

Patch Set 3: Code-Review+1

(1 comment)

Line:141, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java -> Off-topic comment entirely unrelated to this change: why this detour through a string? Why not simply

  File projectFile = new File(projectLocation.toFile(), IProjectDescription.DESCRIPTION_FILE_NAME);

? (Also in other places in this class.)

I don't want to suggest to do that in this change, but it may be something for a future cleanup.

-------------------------------------
author: Alayna Houston
date: 2015-09-19 19:43:49.000000000

Patch Set 3: -Code-Review

(2 comments)

Line:129, org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryFinder.java -> Delete and pass on m.

Line:158, org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryFinder.java -> On second thought, this logic is strange. scale == 0 if children.length > 100.

Why not create the monitor with 2 ticks above (line 139) and do here

  subMonitor.setWorkRemaining(children.length);

and then

  subMonitor.newChild(1)

in lines 163 and 166 below?

-------------------------------------
author: Zaid Mosley
date: 2015-09-21 15:12:19.000000000

Patch Set 3:

(1 comment)

Line:141, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java -> Could point. Can you create a bug report for this and provide a Gerrit review?

-------------------------------------
author: Alayna Houston
date: 2015-09-21 15:26:22.000000000

Patch Set 3:

(1 comment)

Line:141, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java -> I'll get back to it once you're done with these monitor changes. Don't think such an internal clean-up needed a bug report, does it?

-------------------------------------
author: Zaid Mosley
date: 2015-09-21 15:52:30.000000000

Patch Set 3:

I think the Egit team also accepts Gerrit reviews without bug report, we in platform require always a bug report.

-------------------------------------
author: Douglas Trujillo
date: 2015-09-21 22:10:30.000000000

Patch Set 3:

> I think the Egit team also accepts Gerrit reviews without bug
 > report, we in platform require always a bug report.

yes, we don't require a bug report for minor changes. We insist on commit messages explaining what was changed for which reason. Lengthy details like stack traces and discussions can go in Bugzilla.

-------------------------------------
author: Alayna Houston
date: 2015-09-23 06:55:02.000000000

Patch Set 3: Code-Review-1

(1 comment)

Line:269, org.eclipse.egit.core/src/org/eclipse/egit/core/GitMoveDeleteHook.java -> Actually, this doesn't look correct. Please convert to SubMonitor in the callers, and just pass through monitor here. A SubMonitor consumes the whole monitor. In this particular case it just might work (sort of) because mapProject() is the last thing called from moveProject(), but it's not really proper.

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