dwitter icon indicating copy to clipboard operation
dwitter copied to clipboard

Completely unload dweets that are outside the screen

Open lionleaf opened this issue 9 years ago • 3 comments

Even though dweets stop running, they still fill up memory, after scrolling through a couple I easily hit 1GB memory usage on a dwitter tab. Solution would be to free/unload dweets after they have been scrolled away from (say 2 dweets out of screen)

lionleaf avatar Aug 19 '16 08:08 lionleaf

Somehow after scrolling a lot I also get huge frame drops on my MacBook Pro with integrated GPU in addition to the memory leak you mention. On my desktop computer however I don't have this problem which has a relatively powerful GPU. Performance profiler indicated that the problem was due to extensive use of GPU.

PythEch avatar Jun 25 '18 08:06 PythEch

That's interesting. Some kind of HW acceleration of the canvas must be at play. And you're sure it isn't just the active dweet? Full destruction of the iframe is probably the best way to go.

lionleaf avatar Jun 26 '18 01:06 lionleaf

It isn't just the active tweet. The framedrops affect even the #default. Normally I get 60 FPS which shouldn't be an issue, I mean it's the default, right? But after scrolling down a bit, 10-20 dweets maybe, and then scrolling up to the top, I notice I have only 30 FPS on the default dweet. The frame drop happens on all dweets after it happens (10-20 dweets to get there, slows down linearly), not just the default, to be clear.

The behaviour is consistent with Chrome, Chromium and Opera which all use Blink engine. Much surprisingly however, Safari (WebKit) doesn't have this issue, along with Firefox but both have worse rendering performance than Chrome.

Scrolling also is jaggy on Blink browsers, unlike Firefox and Safari. I also disabled extensions while doing these tests.

PythEch avatar Jun 27 '18 03:06 PythEch