fork-dev / TrackerWin

Bug and issue tracker for Fork for Windows
461 stars 10 forks source link

[Performance] Branch search on large repo causes serious freezes #1537

Open bekir-ozturk opened 2 years ago

bekir-ozturk commented 2 years ago

I'm working on a very large repo with hundreds of active branches.

Whenever I try to search for a branch using the search box on the left column, the app freezes for 30 seconds to ~10 minutes. It would be somewhat manageable if the freeze only happened after I typed in my query, but it happens with every keypress. I'm on Windows 11 with fork version 1.71.1.0.

I also noticed that freezes caused by every second click is much worse:

Resource monitor tells me that one of my logical CPU cores is a 100% busy with this while rest of the cores seem idle. No significant disk or network activity.

TanyaPristupova commented 2 years ago

Hi. How many branches to you have?

Could run the following commands and show the output?

git for-each-ref | wc -l
git for-each-ref refs/heads | wc -l
git for-each-ref refs/remotes | wc -l
git for-each-ref refs/tags | wc -l

I guess, it's the same issue: https://github.com/fork-dev/TrackerWin/issues/1363

bekir-ozturk commented 2 years ago

Yes, they seem pretty similar. My results are:

107091
4
32290
74796
TanyaPristupova commented 2 years ago

It's not easy, but we must find a way to fix that.

As for now, you can try to hide tags as a workaround (View -> Hide Tags)

bekir-ozturk commented 2 years ago

Wow, that did the trick. Let me see when I will notice the missing tags 🙂

Thank you for the workaround!

(Btw, I had a difficult time finding this repo, even though I already knew it existed. Even when I found it, I ended up in the issue tracker for MacOS flavor. Maybe you can put issue tracker links to your git-fork website?)

ChuckM2 commented 2 years ago

In one experiment I found that typing the branch name into notepad and then cut and pasting the entire word into Fork performed the search faster than typing each character into Fork. I don't need Fork to search after each typed character and having to use notepad as a workaround is inconvenient.