Bug 224861 - [Markers] ProgressCanvasViewer blocks UI
Summary: [Markers] ProgressCanvasViewer blocks UI
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 207188
Blocks: 225974
  Show dependency tree
 
Reported: 2008-03-31 06:26 EDT by Markus Keller CLA
Modified: 2008-04-10 08:52 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-03-31 06:26:03 EDT
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)
Comment 1 Tod Creasey CLA 2008-04-07 09:39:43 EDT
We should apply the algorithm from Bug 207188 to the text shortening in the progress canvas(which is slightly different)
Comment 2 Tod Creasey CLA 2008-04-07 09:42:46 EDT
Can you give me an idea of the custom date? The fix is clear but I would like to replicate first.

BTW ProgressCanvasViewer is unrelated to the ProgessView. It is the status area on the trim.
Comment 3 Tod Creasey CLA 2008-04-07 10:49:53 EDT
Algorithm from Bug 207188 applied for build >20080407
Comment 4 Markus Keller CLA 2008-04-07 10:54:24 EDT
(In reply to comment #2)
> Can you give me an idea of the custom date? The fix is clear but I would like
> to replicate first.

The date was 2008-02-07 (around 3.4M5). My workspace has most SDK plug-ins from
CVS, except for equinox, update, p2, and help.

> BTW ProgressCanvasViewer is unrelated to the ProgessView. It is the status area
> on the trim.

Oh, thanks for the info and sorry for the wrong accusation.

(In reply to comment #3)
> Algorithm from Bug 207188 applied for build >20080407

Thx, I'll test it in tomorrow's I-build.
Comment 5 Markus Keller CLA 2008-04-10 08:52:45 EDT
Verified in I20080408-0800 that the UI is not blocked any more.

Filed bug 226494 for unnecessary updating of Progress view.
Filed bug 226495 for flickering progress message in trim.