threema-web icon indicating copy to clipboard operation
threema-web copied to clipboard

Memory leaks in Firefox

Open lgrahl opened this issue 5 years ago • 11 comments

For whatever reason, a lot of memory is not free'd when closing a Threema Web tab in Firefox. This is most likely a bug in Firefox.

lgrahl avatar Sep 29 '18 11:09 lgrahl

If closing the tab does not free the memory, there's not much we can do about it.

dbrgn avatar Oct 03 '18 11:10 dbrgn

BTW, just a wild guess: Some stuff could be kept in RAM for the "restore tab" feature.

rugk avatar Oct 03 '18 21:10 rugk

It's Threema Web specific, so I reopen it as we need to work together with Mozilla folks here. I doubt they have it on their radar.

Some stuff could be kept in RAM for the "restore tab" feature.

Multiple GiBs?

lgrahl avatar Oct 04 '18 09:10 lgrahl

Don't know, I cannot say Threema Web even uses multiple GB when it is open. I also don't know how/whether it is possible to measure/display the RAM by it's tab (about:performance does not display it), so I could not reproduce it.

Also, would not it be better to open a Bugzilla issue at Mozilla's site instead of tracking it here?

rugk avatar Oct 04 '18 09:10 rugk

This happens after several days of usage. See about:memory.

I will mention a corresponding bug report here when it's filed.

lgrahl avatar Oct 04 '18 09:10 lgrahl

@lgrahl did you already file a bug? :slightly_smiling_face:

dbrgn avatar Oct 15 '18 14:10 dbrgn

I'd also be interested in this. I use Firefox as my main browser.

MarcoZehe avatar Oct 25 '18 14:10 MarcoZehe

With Firefox 65.0.1 I still encounter the same problem with ~1 GiB lingering in memory after a usage period of two weeks. All tabs have been closed and we don't use service workers. I'd like to investigate this with some help from Mozillians in the IRC since I have no idea where to start and it also takes a while to reproduce, so filing a bug may not be that useful. It could be WebRTC data channel related but none of my numerous data channel test scripts result in memory leaks.

Sorry for the sidetrack @jesup but maybe you have an idea?

lgrahl avatar Mar 02 '19 09:03 lgrahl

At least, now you can use about:performance to see the RAM usage of a single tab. So can you all report that RAM usage?

rugk avatar Mar 02 '19 09:03 rugk

Everytime I use Threema Web the whole browser hangs for several seconds repeatedly. about:performance says the Threema tab needs 455 MB, but about:memory shows that Threema Web consumes over 1 GB of data. I can also see the memory spikes in my System Monitor of Ubuntu. They only happen if the Threema tab is open. I am also not able to type flawlessly in the Threema Web Application itself or even in this textarea.

It is as if the whole browser freezes for 2-3 seconds then it works again for 5 seconds, then it freezes again and so on. There are over 100 other tabs open and none of them is the reason for these freezes. It only happens when I start a Threema session in a new tab or when I reactivate a session using the password.

NicolasGoeddel avatar May 21 '19 18:05 NicolasGoeddel

@NicolasGoeddel The freezes are unfortunate but not related to this issue (memory leaking). Please, file a new issue for the freezing problem. When it comes to lag, it will be of interest whether your system is suffering from high memory pressure and thus may have started to swap. You may want to check that.

lgrahl avatar May 21 '19 20:05 lgrahl