Throttle updates of the EclipseGitProgressTransformer
commit9ee41054835597f90a17cb2bc9c15123b586af65
authorThomas Wolf <thomas.wolf@paranor.ch>
Sat, 6 May 2017 14:16:17 +0000 (6 16:16 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Sat, 6 May 2017 14:41:01 +0000 (6 16:41 +0200)
tree80ba83dfba7458dc963c21c81eba720956355fb1
parentcbabb739a718f570244a06c585c29cd85beca660
Throttle updates of the EclipseGitProgressTransformer

This progress monitor updated its SubMonitor every time if
total == UNKNOWN. This can be very inefficient since it may
involve a UI update. Oxygen seems to include a progress monitor
that optimizes for this, but on Neon and earlier Eclipses,
this progress reporting may slow down operations. Most noticeably
it occurred in the "counting objects" phase of a push operation,
which would become unuseably slow if run in the foreground, but
which would terminate quickly when run in the background.

Bug: 516276
Change-Id: Ib3e37918f493da6a04eb51bcc7086ecd3eb2bc6f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/EclipseGitProgressTransformerTest.java
org.eclipse.egit.core/src/org/eclipse/egit/core/EclipseGitProgressTransformer.java