Lately, my team and I have been getting more focused on addressing high memory usage in our Electron application. Our app has a couple renderer processes that has time goes by can end up eating gigs of memory, when our application uses no where near that amount of memory. We most likely have to spend a good amount of time tracking down this leak(s).
The key thing that has me throughly confused about what's going on is that when looking in Chrome Devtools on the memory tab, the value seems completely reasonable compared to the values that we pull out Activity Monitor. (Images below were captured at the same time)
I don't quite know where to start with this information. Why are these numbers so different? Does our web app have a leak in it that only exposes itself through the Electron application memory? Is there something wrong with how we have Electron setup to render our app? Is it both?
This type of issue seems to be common when using Electron, but for the life of me I cannot find resources to start really debugging this issue. I'm not necessarily looking for a direct answer on my setup, as I have not provided enough information for that directly. I am just on a fact finding mission to gain a better understanding of how to debug this type of issue within the Electron ecosystem.
from How to properly debug Electron memory issues?


No comments:
Post a Comment