gitflow4idea icon indicating copy to clipboard operation
gitflow4idea copied to clipboard

Hanging phpstorm when many submodules are present

Open controvi opened this issue 4 years ago • 7 comments

  • I'm submitting a ...

    • [X] bug report
    • [ ] feature request
    • [ ] puppy => You're not submitting a puppy. I already have one and he's adorable
  • What is the current behavior? When the plugin is active it hangs phpstorm while it keeps saying "Updating indexes". It takes about 1 to 2 minutes. Sadly this happens every time I update a submodule or push something.

  • Is this a bug? Sorry about that. If so give me explicit details how to reproduce: To be fair I have 57 submodules. These don't use gitflow, only the master project does.

  • What is the expected behavior? Well ... to be faster.

  • What is the motivation / use case for changing the behavior? Well i guess this speeks for itself ;) Just want to work faster instead of waiting more then an hour a day for the indexes to be scanned ...

  • Please tell me about your environment:

    • Gitflow4idea version: 0.7.5

    • Gitflow version: 1.12.3 (AVH Edition)

    • IntelliJ Help -> about > click copy icon and paste here. Should look like this:

      PhpStorm 2020.3.1
      Build #PS-203.6682.180, built on December 30, 2020
      Runtime version: 11.0.9.1+11-b1145.63 amd64
      VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
      Windows 10 10.0
      GC: ParNew, ConcurrentMarkSweep
      Memory: 1967M
      Cores: 8
    

Don't have anything else sadly. It just hangs while checking and no errors appear.

Hope you can fix it

controvi avatar Jan 06 '21 14:01 controvi

Is there a chance perhaps your project is open source? If not, any way for you to create a dummy project with a lot of submodules and see if it happens again on your machine?

I'll need a way to reproduce the issue to be able to solve it...

OpherV avatar Jan 06 '21 15:01 OpherV

Sure :) I will try to set something up for you. The project itself sadly is not opensource so can't share it with you.

Tomorrow probably will be to busy to set it all up but will do try to get it done at least before friday end of the day.

controvi avatar Jan 06 '21 16:01 controvi

I was having the same issue. It got so bad, that I had to uninstall this lovely plugin. Unfortunately I also can not share my project with you. Having the same issue with Intellij latest version.

clifficious avatar Mar 01 '21 08:03 clifficious

Sorry you're experiencing this guys. Unfortunately I was not able to reproduce this on my own... So I'm afraid I can't attempt to solve unless I have a local project that presents this problem :(

OpherV avatar Mar 01 '21 08:03 OpherV

I can confirm this issue happens in IntelliJ as well. It seems to happen due to gitflow waiting on a certain FutureTask in de AWT EventQueue thread, which obviously will prevent the window from being drawed for that time. I therefore expect that that something is happening on that thread that should have been executed in parallel instead.

I have my idea.log and threaddump attached.

threadDump-20210706-164056.txt idea.log

CC007 avatar Jul 07 '21 08:07 CC007

Experiencing the same issue. I've been struggling with the slow opening of our project for a while, but now finally discovered that the Gitlfow plugin seems to be the culprit.

Opening our Pronamic Pay project — a payments plugin for WordPress — takes about 2 minutes (MBP 16" from 2019). While opening, the directory tree says "loading..." and in the status bar there is a message "Scanning files to index". If I disable the Gitflow plugin, there are no delays when opening the project 🎉

I was able to reproduce the issue when opening the wp-pronamic-pay project directory in PhpStorm, with these minimal steps (without even installing Node.js and Composer dependencies):

git clone [email protected]:pronamic/wp-pronamic-pay.git
cd wp-pronamic-pay
php src/repositories.php develop

Would love to see this issue resolved in the future, but for now I'm fine with having the Gitflow plugin disabled and enabling it when needed.

Project setup

  • main repository is pronamic/wp-pronamic-pay
  • we support extensions (WordPress plugins) and payment gateways, these are all separate repositories (39 currently) and cloned into a repositories directory within the project directory with the last command (php src/repositories.php develop)
  • the project has all these repositories setup as Git roots (Preferences » Version Control)

Environment

  • Gitflow4idea version: 0.7.7

  • Gitflow version: 1.12.3 (AVH Edition)

  • IntelliJ Help → About:

    PhpStorm 2021.2
    Build #PS-212.4746.100, built on July 28, 2021
    Runtime version: 11.0.11+9-b1504.13 x86_64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
    macOS 12.0.1
    GC: ParNew, ConcurrentMarkSweep
    Memory: 1979M
    Cores: 12
    

rvdsteege avatar Oct 29 '21 20:10 rvdsteege

@rvdsteege Thanks! I'll try to reproduce with this project

OpherV avatar Nov 03 '21 16:11 OpherV