I think this screenshot says it all. Anyone else noticed the Dynalist windows desktop app using a ludicrous amount of RAM like this, or is it just me? It isnāt all the time but I have noticed it on at least 5-10 occasions for sustained periods.
No itās not just you. Dynalist desktop has taken 4 GB on my computer before.
Ping @Shida, I think itās time to post an official explanation about this?
As far as we know, the problem is in Electron, which is what we use to run Dynalist on the desktop. Weāve also seen other things running on Electron use a lot of memory, for example, the Slack desktop app.
The more underlying reason is how Dynalist interacts with Electron. The way Dynalist syncs with our server isnāt something Electron likes. Whatever weāre doing works fine on Chrome (which uses the same engine as Electron) in terms of memory usage, but for some reason, doesnāt work in Electron. This isnāt something we can change easily because of stability and safety concerns.
On the technical side, Iāve drilled down the problem to a basic pattern:
- We use many temporary JS objects, which are created then freed right away
- Chrome frees those objects and then release the allocated memory, so the overall memory usage stays constant
- Electron frees those objects, but does not release the allocated memory, and for some reason, Electron allocate more memory for new objects.
The result is that our desktop app slowly accumulate memory usage as time goes by, even though Dynalist is using the same amount of memory (in my case ~40MB), Electron keeps taking more memory from the system. There seems to be some kind of limit (a fraction of your total RAM) that Electron is able to stay in, because after a while it stops growing.
What I would suggest for now is to restart the app from time to time. A restart should reset its memory usage while retaining any data on disk.
Until we can get more information on why Electron is behaving this way, I wouldnāt have any better ideas, unfortunately.
Same problem here. Dynalist ran up to 8 GB within one day!
Thatās why I have switched from the Windows Desktop App to Chrome (saved as āAdd to desktopā Chrome App).
Question from my side: is there any advantage of the Electron based Windows Desktop Client over the browser based approach Iām not aware of?
Say if you havenāt opened web Dynalist before you board the plane, you wonāt be able to access it. The Windows app however, stores a copy of data locally so you can still see things.
If you always have internet connection, itās visually the same. Web gets updates more often and spellchecking works.
Left it open for 10 minutes and itās jumped to 2-3GB RAM. Itās not useable in this state, will have to settle for the web app only.
I think itās worth reporting these issues if Electron is going to remain the desktop app platform choice.
@Shida should be able to comment on that.
Also just to get more info, do you have a huge number of items? I canāt seem to repro that part. Personally mine reaches 2 GB after half a day or so.
About 26k items. I thought Dynalist does lazy loading though so that wouldnāt affect it?
Lazy loading on the UI, but the data is still kept in memory so that might affect it.
My theory is that the way weāre using objects isnāt something Electron likes. Weirdly enough they use Chromium which is the same engine core as Chrome, and weāre running the exact same app in the browser vs in Electron.
In the past, weāve observed that Electron maintainers usually point the finger at app developers when it comes to memory leaks, unless the report had repro steps that makes it very clear that the issue was with Electron. This issue has been around for years, but nobody managed to come up with convincing evidence for Electronās maintainers to put their efforts to fixing it.
I will take some time and try to come up with a minimal repro, but at this point Iām not confident it will get fixed anytime soon.
@Stephen_Dewitt @Wilhelm_Medetz @Thomas_Fischler @Aaron
We recently did an Electron update, and from our testing, the memory issue is much better.
My personal workspace is pretty big and I do lots of editing on the desktop app. After a few days memory usage seems to top at 170 MB for me.
Thanks in advance!