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.
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!