Open YichenTang97 opened 5 years ago
What exactly causes this issue besides the fact that it is not asynchronous? Does it try to load all of the history at once or something similar?
What exactly causes this issue besides the fact that it is not asynchronous? Does it try to load all of the history at once or something similar?
The function used to get all commit history - getAllCommits is actually asynchronous, and only takes a few seconds - this is why in the first few seconds, the GUI works fine without freezing. Real problem occurs in the callback function of it - processGraph. To be more specific, among the three methods called within the processGraph callback function, sortCommits method still completed although took a long time, however the program got trapped in makeBranchColor. I still need to look deeper into these methods to identify the exact problem.
Step To Reproduce
After a few seconds, the GUI should freeze and your CPU usage will be occupyed by multiple electron process and reach 100%. It will not recover in a few minutes.
For a repo with a single git reference, and over 600 commits, it takes over a minute for the GUI to recover from freezing.
This problem can be a performance problem caused by bad implementation. An existing issue #26 might be related to this issue.