Project: JDT
Bug 196140 [JUnit] performance 'Show failures only' is very slow
Reported: 2007-07-11 08:20:53 | Status: verified fixed

N20070707-0010 1. Run all 6000+ tests from com.ibm.zrh.tests.AllZRHTests (I have some (6) failures, not sure if required to reproduce) 2. Disable 'Show tests in hierarchy' 3. Disable 'Show failures only' 4. Enable 'Show failures only' Is: UI blocks for about 60 seconds Should: Be lightning fast... Heres a dump of what's happening: "main" prio=6 tid=0x00296800 nid=0x129c runnable [0x0090c000..0x0090fe54] java.lang.Thread.State: RUNNABLE at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2178) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:195) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:189) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5022) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4363) at org.eclipse.swt.internal.win32.OS.SendMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.SendMessage(OS.java:2900) at org.eclipse.swt.widgets.Table.CDDS_SUBITEMPREPAINT(Table.java:721) at org.eclipse.swt.widgets.Table.wmNotifyChild(Table.java:5991) at org.eclipse.swt.widgets.Control.wmNotify(Control.java:4565) at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1583) at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4216) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3724) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4363) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2178) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:261) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:189) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5024) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4350) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2178) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:261) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:189) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5024) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4363) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2178) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:261) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:189) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5024) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4363) at org.eclipse.swt.internal.win32.OS.SendMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.SendMessage(OS.java:2900) at org.eclipse.swt.widgets.Table.remove(Table.java:2779) at org.eclipse.jface.viewers.TableViewer.doRemove(TableViewer.java:242) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:721) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:630) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:617) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1431) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1366) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1328) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1429) at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:503) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1388) at org.eclipse.jface.viewers.StructuredViewer.addFilter(StructuredViewer.java:567) at org.eclipse.jdt.internal.junit.ui.TestViewer.setShowFailuresOnly(TestViewer.java:351) - locked <0x0a50eb50> (a org.eclipse.jdt.internal.junit.ui.TestViewer) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.setFilterAndLayout(TestRunnerViewPart.java:1797) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.setShowFailuresOnly(TestRunnerViewPart.java:1786) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart$FailuresOnlyFilterAction.run(TestRunnerViewPart.java:810) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:443) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3681) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3292) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) 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:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) 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:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) at org.eclipse.equinox.launcher.Main.main(Main.java:1144) at org.eclipse.core.launcher.Main.main(Main.java:30) Maybe we need a lazy content provider or a PageBook and switch the page when selecting 'Show failures only' if filtering really takes that long.

Files changed in fix:
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestViewer.java