Project: Eclipse_Platform_UI
Bug 224861 [Markers] ProgressCanvasViewer blocks UI
Reported: 2008-03-31 06:26:03 | Status: verified fixed

I20080330-1350 I did a search for files called *.exsd in my workspace, which returned around 200 matches. I selected all matches (in 'Show as List' mode) and chose context menu > Compare With > Another Branch or version. I added a custom date and hit Enter. The synchronize view opened, then the Eclipse UI was almost blocked for about 2 minutes (a redraw now and then came through). I took a stacktrace (see below) and verified with a profiler that all the time was indeed spent in ProgressCanvasViewer$2.paintControl(PaintEvent). => ProgressCanvasViewer should not block UI => ProgressCanvasViewer should not do any work when the Progress view is not visible (I also have 'Always run in background' enabled). "main" prio=6 tid=0x00397800 nid=0x1378 runnable [0x009de000..0x009dfe68] java.lang.Thread.State: RUNNABLE at org.eclipse.swt.internal.win32.OS.$$YJP$$DrawTextW(Native Method) at org.eclipse.swt.internal.win32.OS.DrawTextW(OS.java) at org.eclipse.swt.internal.win32.OS.DrawText(OS.java:2360) at org.eclipse.swt.graphics.GC.textExtent(GC.java:4773) at org.eclipse.swt.graphics.GC.textExtent(GC.java:4701) at org.eclipse.ui.internal.progress.ProgressManagerUtil.shortenText(ProgressManagerUtil.java:167) at org.eclipse.ui.internal.progress.ProgressViewerLabelProvider.getText(ProgressViewerLabelProvider.java:29) at org.eclipse.ui.internal.progress.ProgressCanvasViewer$2.paintControl(ProgressCanvasViewer.java:210) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:216) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1026) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1011) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1429) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3836) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4486) at org.eclipse.swt.internal.win32.OS.$$YJP$$DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(OS.java) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2339) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3370) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2375) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2339) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2205) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:478) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:473) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManagerUtil.java