UI freeze on large repositories (2.6.1.201812310900, MacOS)
Created originally on Bitbucket by PaulEichhorn (Paul Eichhorn)
On large repositories, opening the MercurialEclipse popup menu freezes the entire IDE for significant amount of times ( 20 000 files -> 6 min freeze ).
Thread dump during this time points to an enablement expression for one or more of the actions. It seems that the cache for file status works on file level, so every file in the working directory is queried at least once. Perhaps a switch to folder status caching at this point might be beneficial.
Thread dump:
#!java
"main" #1 prio=6 os_prio=31 tid=0x00007fac4c826000 nid=0x307 runnable [0x00007ffee5b91000]
java.lang.Thread.State: RUNNABLE
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
at java.io.File.isFile(File.java:882)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:147)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:161)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:161)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:161)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:161)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:161)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:161)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:161)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getChild(HgContainerAdapter.java:161)
at com.vectrace.MercurialEclipse.model.resources.HgContainerAdapter.getFile(HgContainerAdapter.java:120)
at com.vectrace.MercurialEclipse.team.cache.MercurialStatusCache.getLocalMembers(MercurialStatusCache.java:1419)
at com.vectrace.MercurialEclipse.menu.FlagPropertyTester.testAnyChildStatus(FlagPropertyTester.java:175)
at com.vectrace.MercurialEclipse.menu.FlagPropertyTester.test(FlagPropertyTester.java:94)
at org.eclipse.core.internal.expressions.Property.test(Property.java:61)
at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:103)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:55)
at org.eclipse.core.internal.expressions.AdaptExpression.evaluate(AdaptExpression.java:118)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:55)
at org.eclipse.core.internal.expressions.IterateExpression.evaluate(IterateExpression.java:165)
at org.eclipse.core.internal.expressions.ReferenceExpression.evaluate(ReferenceExpression.java:74)
at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:69)
at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:25)
at org.eclipse.ui.internal.handlers.HandlerProxy.setEnabled(HandlerProxy.java:228)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.setEnabled(E4HandlerProxy.java:134)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:320)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:254)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:164)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.setEnabled(HandlerServiceHandler.java:84)
at org.eclipse.core.commands.Command.setEnabled(Command.java:865)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.canExecute(HandlerServiceImpl.java:179)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.canExecuteItem(HandledContributionItem.java:451)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$1.run(AbstractContributionItem.java:516)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.updateItemEnablement(AbstractContributionItem.java:557)
at org.eclipse.e4.ui.workbench.renderers.swt.ToolItemUpdater.updateContributionItems(ToolItemUpdater.java:40)
at org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer$1.changed(ToolBarManagerRenderer.java:355)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:117)
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:365)
at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:189)
at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.lambda$0(ShellActivationListener.java:186)
at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$$Lambda$479/1994004868.widgetDisposed(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:127)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4292)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1516)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1353)
at org.eclipse.swt.widgets.Control.release(Control.java:2961)
at org.eclipse.swt.widgets.Widget.dispose(Widget.java:694)
at org.eclipse.jface.window.Window.close(Window.java:333)
at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:993)
at org.eclipse.jface.dialogs.Dialog.cancelPressed(Dialog.java:485)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:471)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:622)
at org.eclipse.jface.dialogs.Dialog$$Lambda$597/1475167719.accept(Unknown Source)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4292)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4116)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3733)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:628)
at org.eclipse.ui.internal.Workbench$$Lambda$22/351249017.run(Unknown Source)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:391)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
at org.eclipse.equinox.launcher.Main.run(Main.java:1501)