Animated webP image causes huge RAM usage

Talk about code development, features, specific bugzilla bugs, enhancements, patches, and other highly technical things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific referenced Bugzilla bugs, mercurial, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Most "bug reports" do not belong in this board and should initially be posted in Community Support or other relevant support boards.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Post Reply
User avatar
jamess
New to the forum
New to the forum
Posts: 2
Joined: 2020-06-15, 04:57

Animated webP image causes huge RAM usage

Post by jamess » 2020-06-15, 05:07

Hi,

When playing animated webP images (or precisely, short video clips), Pale Moon's RAM usage becomes extremely high. Opening a ~20 MB webP file (for example, this sample file created by the Video Thumbnails Maker) can use over 4 GB of RAM, and hence usually gets Pale Moon killed because of OOM. I also noticed that even if I close the browser immediately after opening the webP, the process won't exit right away. Instead, it takes half a minute for the RAM usage to grow linearly from ~200 MB to over 4 GB and only after that the process terminates.

I am running Pale Moon 28.10.0 (64-bit) Build ID: 20200604221856 on Windows 7, but I can reproduce the issue on Windows 10 as well.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 27871
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Animated webP image causes huge RAM usage

Post by Moonchild » 2020-06-15, 08:54

Using animated WebP images for video has the same drawbacks as using animated GIFs for video. They are image formats, not video formats. They aren't designed for video and shouldn't be used for video representation because they aren't streaming formats.
For the discussion about animated gif memory usage when abused and resulting OOM see viewtopic.php?f=29&t=24497

Bottom line: don't use animated WebP for this. Use WebM which is designed for video.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

User avatar
jamess
New to the forum
New to the forum
Posts: 2
Joined: 2020-06-15, 04:57

Re: Animated webP image causes huge RAM usage

Post by jamess » 2020-06-16, 03:48

Moonchild wrote:
2020-06-15, 08:54
For the discussion about animated gif memory usage when abused and resulting OOM see viewtopic.php?f=29&t=24497
Thanks for the pointer. I haven't noticed OOM caused by huge GIF, but I see how they are similarly handled.
Moonchild wrote:
2020-06-15, 08:54
Bottom line: don't use animated WebP for this. Use WebM which is designed for video.
Fair enough, I don't like huge animated webP either, so I have image.animation_mode set to "none". But that doesn't stop the frames from being decoded, and hence still causes huge RAM usage despite being unnecessary.

Post Reply