You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
performanceRelating to things affecting performancepriority-2Bug that affects more than a few users in a meaningful way but doesn't prevent core functions
I saw this tweet recently and got me to wondering if our habit of logging things to the dev tools might be part of this problem:
related: if you console.log something with the devtools open it does not get garbage collected. This might seem like an obvious statement, but many forget and spend hours trying to figure out why the app is leaking memory
the user keeps the app open for a sufficiently long time while interacting with it (switching branches is likely to help speed this process up)
I'd love to figure out a way to expire the commit cache in a way that doesn't affect the current application state, but this has fallen down my priority queue currently.
performanceRelating to things affecting performancepriority-2Bug that affects more than a few users in a meaningful way but doesn't prevent core functions
Activity
[-]RAM increases over time[/-][+]RAM iusage ncreases over time[/+][-]RAM iusage ncreases over time[/-][+]RAM usage increases over time[/+]shiftkey commentedon Nov 24, 2017
I saw this tweet recently and got me to wondering if our habit of logging things to the dev tools might be part of this problem:
shiftkey commentedon Feb 12, 2018
This link walks through a number of APIs in Electron for profiling memory usage -
definitely useful for tackling problems like this: http://seenaburns.com/debugging-electron-memory-usage/
cheshire137 commentedon Apr 5, 2018
👋 A note that this still occurs in version 1.1.1 in macOS:
This was after a few days of the app being open, switching between branches and repositories.
shiftkey commentedon Apr 8, 2018
@cheshire137 the fact that it's a
Helperprocess suggests that it's the renderer process, which is good because the dev tools can help!The next time you see significant memory usage in the app, could you grab a Heap Snapshot by opening the dev tools and clicking these items?
The file will probably be > 50MB, but if I can get my hands on that it'd be a great start to troubleshooting what's leaking in the app.
cheshire137 commentedon Apr 11, 2018
I've got a juicy 1.13GB memory-using GitHub Desktop for you, I just hope I can get the snapshot:
shiftkey commentedon Apr 11, 2018
@cheshire137
sohel69 commentedon Apr 12, 2018
shiftkey commentedon Sep 21, 2018
I was chatting with @cheshire137 about this and I realise that I didn't really add more details about what's happening here.
It comes down to three things:
GitStorehas a commit cache that we fill with commits over timedesktop/app/src/lib/stores/git-store.ts
Line 92 in b7895b6
desktop/app/src/lib/stores/git-store.ts
Lines 466 to 477 in b7895b6
GitStoreinstances in memory for the lifetime of the appdesktop/app/src/lib/stores/app-store.ts
Lines 510 to 524 in b7895b6
I'd love to figure out a way to expire the commit cache in a way that doesn't affect the current application state, but this has fallen down my priority queue currently.