fb-mac-messenger
fb-mac-messenger copied to clipboard
Memory Leak
I have noticed an issue with the App lately that if I leave it running for extended periods, even with my MacBook Pro in sleep mode, the Messenger app will end up consuming huge amounts of RAM. At one point after I had left my computer in sleep mode for a few days it was consuming 11.5GB and brought my machine to its knees.

I have been using messenger.com in a safari tab for the last couple of weeks to try and see if it was not specific to this application, but that tab is fine even after all this time and I haven't had to close and reopen it.
I've got a similar problem, it's been getting up in the multiple GB range every few days.
+1
+1
This is unfortunately not an issue with this app (I've spent time with instruments trying to find leaks and it all points to webkit) We could work around the issues though by force-restarting the web view once in a while, but that's a hack and would lead to a reduction in user-experience quality.
If anyone has time, please do attempt to instrument the app and investigate where memory is allocated (but never free'd.)
I'm not going to do anything about this until we know what's actually causing the issue.
Just a thought, you could force restart the web view when refreshing the page. Refreshing the page did not make the memory usage go down at all - and actually went up
I encountered a similar problem in Safari in another project. https://github.com/weirongxu/plantuml-previewer.vim/issues/6
The problem that caused a memory leak was that a single image file was being repeatedly loaded, and Safari kept each copy in memory, which led to lots of memory usage. (Interestingly, chrome did not have a memory leak.) Safari wouldn't even garbage collect the old images when refreshing the page.
@rsms Running the XCode analyzer gave the following warnings:
If you've seen this and the memory leak is not related to any of this I would like to know what can I do, specifically, to help resolve this issue. I use the app on a daily basis and it just slows down my computer a lot 😞
fwiw I encounter pretty bad memory leaks with messenger.com running in a Chrome tab, I have to hard-reload to release the 2-3 GB it hoards after a couple days.
You can run a launchd script to monitor memory usage and restart app. For example: https://github.com/longngn/fb-mac-messenger-monitor