Hi! Just noticed that app (v1.2.0) uses more than 600MB of RAM (running since update, so few days). It's huge. After launch and few chats it around 130MB. Since launch laptop was suspended several times while on the go/at night.
Can something be done here? Suppose, it's all about Facebook JS leaks, but maybe there's an option to reload app from time to time automatically?
And more about Electron usage: is there a reason to build releases without any kind of Dev Tools, etc to use less RAM and space on disk?
I'm not quite sure reloading the app from time to time would be considered an actual fix. I do agree that Facebook probably has quite a few memory leaks in their JS, which is sad because of how large and influential they are in the software world.
You could always create a cron job that kills all caprine processes then restarts them once a day or so.
Reloading randomly is not really something I'm comfortable with doing.
Since the latest Caprine update contained an update to latest Electron, which updated to Chrome 49, I would do a qualified guess that somehow the Facebook Messenger codebase triggers a memory leak in that Chrome version.
Will work on Release builds later on current project, so will check if it really helps.
http://electron.atom.io/docs/v0.37.2/development/build-system-overview/#two-phase-project-generation
Can you try out the latest version and see if it's still an issue? https://github.com/sindresorhus/caprine/releases/tag/1.4.0 That version bumped Electron which includes a Chrome and Node.js upgrade.
Been running an instance of Caprine for the past few days and we seem to be stable at around 120MB which is much better than 600.
Upgraded earlier today, looks good so far, had ~200 MB max.
But if @danhp runs it for few days and it's fine (and hopefully uses the Messenger actively :) ) - let's close it. Will see tomorrow how it goes after 24h.
Most helpful comment
Reloading randomly is not really something I'm comfortable with doing.
Since the latest Caprine update contained an update to latest Electron, which updated to Chrome 49, I would do a qualified guess that somehow the Facebook Messenger codebase triggers a memory leak in that Chrome version.