RubinCarter / gitflow4idea-plus

Apache License 2.0
46 stars 10 forks source link

[bug report/feature request] slow IDE startup with a lot of submodules #9

Open laylatichy opened 2 years ago

laylatichy commented 2 years ago

for each of them at startup, so startup time is going up from 2-3s to 1-2mins as it causing a thread freeze

"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 waiting on condition
     java.lang.Thread.State: WAITING
 on java.util.concurrent.FutureTask@220b5c34
    at java.base@11.0.14.1/jdk.internal.misc.Unsafe.park(Native Method)
    at java.base@11.0.14.1/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
    at java.base@11.0.14.1/java.util.concurrent.FutureTask.awaitDone(FutureTask.java:447)
    at java.base@11.0.14.1/java.util.concurrent.FutureTask.get(FutureTask.java:190)
    at gitflow.GitflowConfigUtil.update(GitflowConfigUtil.java:94)
    at gitflow.GitflowConfigUtil.<init>(GitflowConfigUtil.java:73)
    at gitflow.GitflowConfigUtil.getInstance(GitflowConfigUtil.java:56)
    at gitflow.GitflowBranchUtil.update(GitflowBranchUtil.java:51)
    at gitflow.GitflowBranchUtil.<init>(GitflowBranchUtil.java:44)
    at gitflow.GitflowBranchUtilManager.setupBranchUtil(GitflowBranchUtilManager.java:29)
    at gitflow.GitflowBranchUtilManager.update(GitflowBranchUtilManager.java:46)
    at gitflow.ui.GitflowWidget.update(GitflowWidget.java:197)
    at gitflow.ui.GitflowWidget.access$000(GitflowWidget.java:64)
    at gitflow.ui.GitflowWidget$1.run(GitflowWidget.java:184)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
    at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
    at com.intellij.openapi.application.impl.FlushQueue$$Lambda$292/0x0000000800439840.run(Unknown Source)
    at java.desktop@11.0.14.1/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop@11.0.14.1/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop@11.0.14.1/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop@11.0.14.1/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base@11.0.14.1/java.security.AccessController.doPrivileged(Native Method)
    at java.base@11.0.14.1/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop@11.0.14.1/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
    at com.intellij.ide.IdeEventQueue$$Lambda$619/0x0000000800847c40.compute(Unknown Source)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
    at com.intellij.ide.IdeEventQueue$$Lambda$618/0x0000000800847840.run(Unknown Source)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
    at com.intellij.ide.IdeEventQueue$$Lambda$610/0x000000080080cc40.run(Unknown Source)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
    at java.desktop@11.0.14.1/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop@11.0.14.1/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop@11.0.14.1/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop@11.0.14.1/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop@11.0.14.1/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop@11.0.14.1/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
  1. create a repo with a lot of git submodules, I'm currently running a new project with 31 submodules

Non-Bundled Plugins: some.awesome (1.14) ski.chrzanow.foldableprojectview (1.1.2) quokka.js (1.0.333) org.toml.lang (221.5080.126) monokai-pro (1.8.1) lermitage.intellij.battery.status (1.24.201) leetcode-editor (8.0) intellij-clock (2.0.0) ideanginx9 (0.1.9) dev.meanmail.plugin.nginx-intellij-plugin (2021.3-2022.1) de.netnexus.camelcaseplugin (3.0.12) com.xinkun.theme.md (1.7.12) com.sburlyaev.terminal.plugin (0.4.5) com.jetbrains.edu (2022.2-2021.3-864) org.intellij.plugins.hcl (221.5080.126) com.intellij.ideolog (203.0.28.1) com.intellij.properties (221.5080.126) org.intellij.plugins.postcss (221.5080.154) com.hiberbee.intellij.hiberbee-theme (2021.6.9.1041) com.github.copilot (1.1.17.1262) com.github.b3er.idea.plugins.arc.browser (0.32) com.fernandojimenez.obsidian.theme (3.0.0) com.dubreuia (2.3.0) com.berzanmikaili.intellij.monokai_pro (2.0.2c) com.andrey4623.rainbowcsv (2.0.1) YAML/Ansible support (0.11.2) com.intellij.plugin.adernov.powershell (2.0.10) String Manipulation (9.4.0) Key Promoter X (2022.1.1) zielu.gittoolbox (212.8.9) mobi.hsz.idea.gitignore (4.4.0) net.king2500.plugins.PhpAdvancedAutoComplete (1.1.0) de.espend.idea.php.phpunit (6.2) de.espend.idea.php.annotation (8.2.0) de.espend.idea.laravel (0.15.4) NEON support (0.5.1) org.rust.lang (0.4.168.4555-221) jones.restarteslintaction.restart-eslint-action (0.0.1) intellij.prettierJS (221.5080.169) tv.twelvetone.intellij.plugins.intellivue (1.1.12) dev.blachut.svelte.lang (0.22.0) com.intellij.lang.jsgraphql (3.1.3) izhangzhihao.rainbow.brackets (6.21) com.dmarcotte.handlebars (221.5080.240) com.chrisrm.idea.MaterialThemeUI (7.3.2) ImportCost (1.0.221) com.mallowigi (64.0.0) Gitflow-Fix (0.7.10) Dummy Text Generator (1.2.0) com.intellij.kubernetes (221.5080.240) ru.adelf.idea.dotenv (2022.1) aws.toolkit (1.42-221) Batch Scripts Support (1.0.13) AWSCloudFormation (221.5080.126)



benchmark on a project with less submodules

idea.log without gitflow plugin - startup 6sec
[idea - Copy.log](https://github.com/RubinCarter/gitflow4idea-plus/files/8557428/idea.-.Copy.log)

idea.log with gitflow plugin - startup 1min 27sec
[idea - Copy (2).log](https://github.com/RubinCarter/gitflow4idea-plus/files/8557461/idea.-.Copy.2.log)

cheers
paveldvorak5 commented 2 years ago

I go similar issue. When the plugin is enabled, the IDE freezes for about 10 seconds on project open. I didn't see any exception in the log however.

mogoa commented 2 years ago

Hello,

I got similar issues with 5 submodules. It tooks about 60s per submodule and the IDE is frozen and UI not responding.

phpstorm 2022.1.2 Build #PS-221.5787.33, built on June 1, 2022

logs

2022-06-29 15:59:23,504 [ 164937]   WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 72058ms, details saved to C:\Users\plom\AppData\Local\JetBrains\PhpStorm2022.1\log\threadDumps-freeze-20220629-155816-PS-221.5787.33-72sec
2022-06-29 15:59:23,504 [ 164937]   WARN - #c.i.o.a.i.ActionUpdater - 72071 ms to grab EDT for StopAction#update (com.intellij.execution.actions.StopAction)
2022-06-29 15:59:23,504 [ 164937]   WARN - #c.i.o.a.i.ActionUpdater - 72070 ms to grab EDT for #update (com.intellij.toolWindow.ToolWindowHeader$1)
2022-06-29 16:00:27,528 [ 228961]   WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 64019ms, details saved to C:\Users\plom\AppData\Local\JetBrains\PhpStorm2022.1\log\threadDumps-freeze-20220629-155928-PS-221.5787.33-64sec
2022-06-29 16:00:27,544 [ 228977]   WARN - #c.i.o.a.i.ActionUpdater - 72078 ms total to grab EDT 6 times at 'NavBarToolbar' to expand CustomisedActionGroup (com.intellij.ide.ui.customization.CustomisedActionGroup). Use `UpdateInBackground`.
2022-06-29 16:00:27,544 [ 228977]   WARN - #c.i.o.a.i.ActionUpdater - 72070 ms total to grab EDT 1 times at 'ToolwindowTitle' to expand  (com.intellij.toolWindow.ToolWindowHeader$1). Use `UpdateInBackground`.
2022-06-29 16:01:34,706 [ 296139]   WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 67134ms, details saved to C:\Users\plom\AppData\Local\JetBrains\PhpStorm2022.1\log\threadDumps-freeze-20220629-160032-PS-221.5787.33-67sec
2022-06-29 16:02:43,569 [ 365002]   WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 68830ms, details saved to C:\Users\plom\AppData\Local\JetBrains\PhpStorm2022.1\log\threadDumps-freeze-20220629-160139-PS-221.5787.33-68sec
2022-06-29 16:02:44,322 [ 365755]   INFO - #z.g.blame - Annotated file:////wsl$/Ubuntu-20.04/home/plom/CPO/src/kiplom/KiplomBundle/Entity/Log.php: zielu.gittoolbox.a.d@5912c713
2022-06-29 16:03:53,158 [ 434591]   WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 69509ms, details saved to C:\Users\plom\AppData\Local\JetBrains\PhpStorm2022.1\log\threadDumps-freeze-20220629-160248-PS-221.5787.33-69sec
2022-06-29 16:05:00,584 [ 502017]   WARN - #c.i.d.PerformanceWatcherImpl - UI was frozen for 67395ms, details saved to C:\Users\plom\AppData\Local\JetBrains\PhpStorm2022.1\log\threadDumps-freeze-20220629-160358-PS-221.5787.33-67sec
2022-06-29 16:05:00,693 [ 502126]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - ignore deprecated groupId: appearance for id: MTConfigurable
2022-06-29 16:05:00,693 [ 502126]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - ignore deprecated groupId: appearance for id: MTCustomThemeConfigurable
2022-06-29 16:05:00,693 [ 502126]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - ignore deprecated groupId: appearance for id: AtomSelectConfig
2022-06-29 16:05:00,693 [ 502126]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - ignore deprecated groupId: appearance for id: MTProjectConfigurable
2022-06-29 16:05:01,528 [ 502961]   INFO - #c.i.AbstractBundle - Cannot load resource bundle from *.properties file, falling back to slow class loading: messages.PhpTBundle
2022-06-29 16:05:01,529 [ 502962]   INFO - #c.i.i.p.PluginManager - Cannot find plugin com.intellij.php.phpt resource-bundle: messages.PhpTBundle

and here is one threadDump freeze file :

"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 waiting on condition
     java.lang.Thread.State: WAITING
 on java.util.concurrent.FutureTask@2e111dc0
    at java.base@11.0.15/jdk.internal.misc.Unsafe.park(Native Method)
    at java.base@11.0.15/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
    at java.base@11.0.15/java.util.concurrent.FutureTask.awaitDone(FutureTask.java:447)
    at java.base@11.0.15/java.util.concurrent.FutureTask.get(FutureTask.java:190)
    at gitflow.GitflowConfigUtil.update(GitflowConfigUtil.java:94)
    at gitflow.GitflowBranchUtil.update(GitflowBranchUtil.java:52)
    at gitflow.GitflowBranchUtil.<init>(GitflowBranchUtil.java:44)
    at gitflow.GitflowBranchUtilManager.setupBranchUtil(GitflowBranchUtilManager.java:29)
    at gitflow.GitflowBranchUtilManager.update(GitflowBranchUtilManager.java:46)
    at gitflow.ui.GitflowWidget.update(GitflowWidget.java:197)
    at gitflow.ui.GitflowWidget.access$000(GitflowWidget.java:64)
    at gitflow.ui.GitflowWidget$1.run(GitflowWidget.java:184)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:215)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:197)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
    at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:511)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:69)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:112)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42)
    at com.intellij.openapi.application.impl.FlushQueue$$Lambda$312/0x000000010043ac40.run(Unknown Source)
    at java.desktop@11.0.15/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop@11.0.15/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop@11.0.15/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop@11.0.15/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base@11.0.15/java.security.AccessController.doPrivileged(Native Method)
    at java.base@11.0.15/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop@11.0.15/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:898)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:439)
    at com.intellij.ide.IdeEventQueue$$Lambda$572/0x00000001006be440.compute(Unknown Source)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:803)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:438)
    at com.intellij.ide.IdeEventQueue$$Lambda$571/0x00000001006be040.run(Unknown Source)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
    at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:604)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:436)
    at com.intellij.ide.IdeEventQueue$$Lambda$567/0x00000001006b8c40.run(Unknown Source)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:873)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:484)
    at java.desktop@11.0.15/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop@11.0.15/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop@11.0.15/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop@11.0.15/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop@11.0.15/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop@11.0.15/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

"BaseDataReader: wsl.exe" prio=0 tid=0x0 nid=0x0 runnable
     java.lang.Thread.State: RUNNABLE
 (in native)
    at java.base@11.0.15/java.io.FileInputStream.readBytes(Native Method)
    at java.base@11.0.15/java.io.FileInputStream.read(FileInputStream.java:279)

[...]

Env :

PhpStorm 2022.1.2 on windows source and git on WSL2

paveldvorak5 commented 1 year ago

Same problem here. I don't see any thread dump but the IDE waits about a minute on startup.