This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Remove uses of nodegit #12159
Closed
Description
We're seeing crashes in Atom stable. We believe that the crashes are caused by nodegit (introduced in #9213). So for now, we're going to back out all of our usage of nodegit in core and bundled packages:
- fuzzy-finder (Stop using async repo (for now) fuzzy-finder#236)open-on-github (Stop using async git repository (for now) open-on-github#75)
Refs #12153
Metadata
Metadata
Assignees
Labels
No labels
Activity
lee-dohm commentedon Jul 13, 2016
I suspect #11358 is related to this also.
subesokun commentedon Jul 17, 2016
@maxbrunsfeld @lee-dohm Does this mean that the new async Git API will be removed for the time being and it's unclear if it will be shipped again in Atom 1.10?
This causes quite some troubles for me as I've already completely migrated the tree-view-git-status package onto the new async API as the old sync API didn't work any longer. It was really a big effort to migrate to the async API and now I've to undo everything again? ... just wondering why such breaking changes are not causing a major version bump of Atom ...
lgeiger commentedon Nov 20, 2017
@maxbrunsfeld @lee-dohm @smashwilson I there a way we could revisit this issue?
Opening a git repository over a the network (e.g. via a SSHFS mounted network drive) can take multiple seconds. Due to the synchronous
git-utils
API this may completely block Atom which makes accessing git repositories over Wifi completely unusable.Here is a CPU profile that illustrates this issue when adding a remote git repository to the tree view:
git-repo.zip
I'm happy to help with this problem and provide more information if needed.
maxbrunsfeld commentedon Nov 21, 2017
@lgeiger Yeah, this is a really big known problem, and I think it needs to be a fairly high priority for us. We definitely want to remove all uses of synchronous
git-utils
calls. I don't think that necessarily means we're going to usenodegit
again (although that is an option). We've already replaced some of the synchronous APIs ingit-utils
with async ones: see atom/git-utils#80, and that has been fairly painless. I don't know the status ofnodegit
since we attempted to use it in Atom (and experienced intermittent crashes) last year.It's great to hear that you're interested in helping. There are three main components to this effort:
GitRepository
APIs. I can see two ways of doing this:a. Add async variants of these methods to
git-utils
, similar to what I did in Add a few async APIs needed by Atom git-utils#80.b. Implement these methods using
nodegit
, and verify with very high confidence thatnodegit
won't cause the app to crash anymore.Do you have thoughts on this? Would you like to help do some of this work?
lgeiger commentedon Jan 4, 2018
Thanks for the detailed explanation!
Sorry for not getting back to you earlier.
I didn't find time to try one of the above options but for now I made some CPU profiles to help illustrate the problem. All of the profiles where taken using a network mounted folder via
sshfs
while on a stable wireless internet connection.Adding git repo to project and open file
Open file from already loaded git repo
Here is the full profile: sshfs_load.zip
Have you though about making use of the github package to get the diff and status of the repo?
It shells out via
dugite
instead of relying ongit-utils
/libgit2
. Apart from that it would remove the need to maintain two different git tools bundled inside Atom.lock commentedon Jul 3, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!