Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Run git commands in dedicated renderer process #688
This PR addresses the issue of Atom freezing due to multiple blocking spawn calls when shelling out to Git in process (#386).
The solution is to make Git calls in a separate process, options being a Node child process, Electron renderer process, or Chromium web worker.
This PR implements a dedicated renderer process for shelling out to Git.
Basic testing with a Node child process revealed quadratic growth in IPC time relative to message size so this approach was dismissed due to the negative performance implications. The fix for this won't be released until Node v7.5.0.
Web workers are the ideal solution, but will have to wait until Atom is upgraded to Electron v1.6.4 which adds Node integration to web workers.
This PR introduces a
The renderer process keeps a running average of the time it takes to make a spawn call and if this exceeds 20ms (and the minimum number of operations specified have been completed), the
If a renderer process crashes, the
Things to consider for future PRs:
referenced this pull request
Apr 20, 2017
A few things to clean up and take care of, but overall this PR is
This is really, really cool. I'll install this branch and give it a shot over the next few days but I'd