zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
604 stars 73 forks source link

[BUG] too many processes spawned #404

Closed Jidehem closed 2 years ago

Jidehem commented 2 years ago

Describe the bug The plugin can spawns to many Git processes, and the number of spawned processes is increasing until CPU limit is reached (~around 1000 processes on my machine)

To Reproduce Steps to reproduce the behavior:

  1. Launch IntelliJ with the GitToolbox enabled
  2. Open a complex project with around 10-15 different Git repositories
  3. When checking in task manager, the number of tasks progressively increases up to 100% CPU is filled

Workaround Disable the GitToolbox plugin

Expected behavior The number of spawned processes should remain bounded and not exhaust machine's resources.

Plugin version 212.9.0

IDE version IntelliJ IDEA 2022.1.2 (Ultimate Edition) Build #IU-221.5787.30, built on May 31, 2022 Licensed to ELCA Informatique SA / Jean-David Maillefer Subscription is active until December 5, 2022. Runtime version: 11.0.15+10-b2043.56 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Registry: debugger.watches.in.variables=false ide.tooltip.initialDelay=584 maven.import.compiler.arguments=false

Non-Bundled Plugins: krasa.CpuUsageIndicator (1.14) de.netnexus.camelcaseplugin (3.0.12) com.khmelyuk.multirun (1.13) org.jetbrains.kotlin (221-1.7.0-release-281-IJ5591.52) com.intellij.guice (221.5787.20) com.dubreuia (2.3.0) VisualVMLauncher (1.21.211.6085.0) GrepConsole (12.14.211.6693.0) org.sonarlint.idea (6.7.0.45926) mobi.hsz.idea.gitignore (4.4.0) com.intellij.javaee.batch (221.5787.20) Karma (221.5787.15) com.ppolivka.plugin.gitcleaner (1.1.4) com.atlassian.bitbucket.references (2022.1.200) FitNesse (1.13.0) CMD Support (1.0.5) Builder Generator (1.1.8) org.mapstruct.intellij (1.3.1) org.jfrog.idea (1.16.0) com.haulmont.jpab (2022.2.5-221)

Kotlin: 221-1.7.0-release-281-IJ5591.52

Note: the GitToolbox is not listed as I had to disable it in order to access the "About" menu...

Screenshots From Windows Task Manager: 2022-06-15 16_44_08-Window We can clearly see that the number of spawned processes is above 1000. Most of the commands are "Git for Windows". A lot of other processes are shells which are probably used to control "Git for Windows" (not visible on the screenshot)

zielu commented 2 years ago

Hi, could you check some of these processes to see what git command they are running ? With 15 repos I would not expect to see more than 50 but only when opening the project.

Jidehem commented 2 years ago

I've re-enabled the plugin and IntelliJ's sub-processes are always following the same tree structure image

Using Process Explorer to get more infos, it appears that

zielu commented 2 years ago

Could you switch to EAP channel ? 212.9.5 should fix this

Jidehem commented 2 years ago

The issue seems to be fixed after updating to 212.9.5.

zielu commented 2 years ago

Done in (211/212).9.6