1 nothing-special github web page blows browser to almost 4GB
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 bugs, git, the repositories, 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. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.
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.
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 bugs, git, the repositories, 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. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.
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.
1 nothing-special github web page blows browser to almost 4GB
Hi,
I went to <https://github.com/bigH/git-fuzzy>. Browser mem size just exploded. Never seen anything like it.
This happens whether javascript is disabled or enabled in the browser.
Win 2k8R2, palemoon 28.6.1 (needs updating I know). Any more info needed, just ask.
I went to <https://github.com/bigH/git-fuzzy>. Browser mem size just exploded. Never seen anything like it.
This happens whether javascript is disabled or enabled in the browser.
Win 2k8R2, palemoon 28.6.1 (needs updating I know). Any more info needed, just ask.
-
- Pale Moon guru
- Posts: 35650
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: 1 nothing-special github web page blows browser to almost 4GB
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Re: 1 nothing-special github web page blows browser to almost 4GB
I can confirm this it is because of multiple 2800x1412 size ~4.5 megabyte animated gifs. (yes I checked it is actually a gif not just pretending)
-
- Knows the dark side
- Posts: 4983
- Joined: 2015-12-09, 15:45
Re: 1 nothing-special github web page blows browser to almost 4GB
Holy shitNew Tobin Paradigm wrote: ↑2020-05-31, 10:21I can confirm this it is because of multiple 2800x1412 size ~4.5 megabyte animated gifs. (yes I checked it is actually a gif not just pretending)
What's the site supposed to be about? 'How to recreate MySpace using framework du jour' ?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Re: 1 nothing-special github web page blows browser to almost 4GB
Further info.
Was run in a virtual machine (VM), but originally done outside a VM with Jscript disabled. Original browser had TrackMeNot and Noscript enabled. Also cookies disabled.
Browser in VM had neither - it was plain, and restarted from scratch. Nothing special done to it at all.
Info on browser running clean in a VM below (sorry about previous idiocy):
Was run in a virtual machine (VM), but originally done outside a VM with Jscript disabled. Original browser had TrackMeNot and Noscript enabled. Also cookies disabled.
Browser in VM had neither - it was plain, and restarted from scratch. Nothing special done to it at all.
Info on browser running clean in a VM below (sorry about previous idiocy):
-
- Knows the dark side
- Posts: 4983
- Joined: 2015-12-09, 15:45
Re: 1 nothing-special github web page blows browser to almost 4GB
Have you tried it with other browsers?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Re: 1 nothing-special github web page blows browser to almost 4GB
I've already confirmed the behavior. I mean yeah, large ass animated gifs use a bunch of memory.. the question now is.. if there is anything can be done about it and if we should bother.. Large animated gifs may simply be out of spec to bother with. I don't know..
Also, moonbat.. You're not helping.
Also, moonbat.. You're not helping.
Re: 1 nothing-special github web page blows browser to almost 4GB
@Moonbat: I only use PM. I might have chrome lying around n a VM. Let me see.
(just tried it in eww, the emacs browser, it says "stopping animatrion; animation possibly too big). Will check chrome
@New Tobin Paradigm: Let's be generous and assume the GIFs total 20MB (it's less). The PM bloat goes to ~4GB. That's a memeory 200x blowup. Does that sound acceptable?
Will update shortly.
(just tried it in eww, the emacs browser, it says "stopping animatrion; animation possibly too big). Will check chrome
@New Tobin Paradigm: Let's be generous and assume the GIFs total 20MB (it's less). The PM bloat goes to ~4GB. That's a memeory 200x blowup. Does that sound acceptable?
Will update shortly.
-
- Keeps coming back
- Posts: 943
- Joined: 2017-12-14, 12:59
Re: 1 nothing-special github web page blows browser to almost 4GB
Confirmed.New Tobin Paradigm wrote: ↑2020-05-31, 10:21I can confirm this it is because of multiple 2800x1412 size ~4.5 megabyte animated gifs. (yes I checked it is actually a gif not just pretending)
Shouldn't image.animation_mode set to none decrease RAM consumption?
It seems to have no effect on Pale Moon here.
Re: 1 nothing-special github web page blows browser to almost 4GB
Newish VM, installed chrome (latest; Ver 83.0.4103.61, released 2 days ago), loaded page in question, ram bounces up and down with multiple chrome processes, but when it's loaded the mem used by chrome processes totals about 130MB.
Re: 1 nothing-special github web page blows browser to almost 4GB
What did I say?
I now hope nothing is done about this because you people wouldn't listen. In fact it should use MORE ram.
I now hope nothing is done about this because you people wouldn't listen. In fact it should use MORE ram.
-
- Knows the dark side
- Posts: 4983
- Joined: 2015-12-09, 15:45
Re: 1 nothing-special github web page blows browser to almost 4GB
Off-topic:
Wow. Just took them 9 years to get around to fixing this with a much bigger development team at their disposal. God knows what else was pushed on the backburner while they were dicking around with Australis and e10s.
Wow. Just took them 9 years to get around to fixing this with a much bigger development team at their disposal. God knows what else was pushed on the backburner while they were dicking around with Australis and e10s.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
-
- Pale Moon guru
- Posts: 35650
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: 1 nothing-special github web page blows browser to almost 4GB
Solution: don't use multiple 2800x1412 size ~4.5 megabyte animated gifs.
As for the memory consumption: yes that is normal. Every frame of the animated gif will be decoded and stored as a raw image in memory - in most cases such a decoded image frame will take 2800x1412x4=15MB. Multiply that by the number of frames and you see that this is very RAM-expensive.
Depending on its use, it may get one or more copies of that in memory for compositing and/or effects, or as texture memory or similar. On the plus side each frame may take less if not represented as 32-bits.
The problem is that an animated gif is NOT a video format even though it's commonly abused as such. Animated gifs almost always use delta frames for the next frame in the animation. If you discard frames there is no way to recreate the discarded frames except to re-decode the animation from the first frame.
The images take 1.7GB, 1.35GB and 920MB, respectively, in browser surface memory; of which the bulk is decoded frames and 1 extra compositing surface frame.
I don't see a reason for us to do anything about this. It's wrong use of images, and the solution will require a lot of compromise for a corner case of abuse.
As for the memory consumption: yes that is normal. Every frame of the animated gif will be decoded and stored as a raw image in memory - in most cases such a decoded image frame will take 2800x1412x4=15MB. Multiply that by the number of frames and you see that this is very RAM-expensive.
Depending on its use, it may get one or more copies of that in memory for compositing and/or effects, or as texture memory or similar. On the plus side each frame may take less if not represented as 32-bits.
The problem is that an animated gif is NOT a video format even though it's commonly abused as such. Animated gifs almost always use delta frames for the next frame in the animation. If you discard frames there is no way to recreate the discarded frames except to re-decode the animation from the first frame.
The images take 1.7GB, 1.35GB and 920MB, respectively, in browser surface memory; of which the bulk is decoded frames and 1 extra compositing surface frame.
I don't see a reason for us to do anything about this. It's wrong use of images, and the solution will require a lot of compromise for a corner case of abuse.
You do not have the required permissions to view the files attached to this post.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Re: 1 nothing-special github web page blows browser to almost 4GB
It's not my website so I can't change that. I was simply reporting it as a possible bug.
If that's how PM or its library handles animated gifs I can't complain. Your description of delta encoded frames matches what I'd expect its implementation to be. The trivial way of handling it is to have a 2-entry ring buffer to build off the last full frame, etc. etc. but that's to swap lots of memory for some amount of CPU. It's not a great answer. Best answer is as you say, just don't do it.
I assume you'll close this with wontfix or similar. I'd support that. Thanks.
If that's how PM or its library handles animated gifs I can't complain. Your description of delta encoded frames matches what I'd expect its implementation to be. The trivial way of handling it is to have a 2-entry ring buffer to build off the last full frame, etc. etc. but that's to swap lots of memory for some amount of CPU. It's not a great answer. Best answer is as you say, just don't do it.
I assume you'll close this with wontfix or similar. I'd support that. Thanks.
-
- Pale Moon guru
- Posts: 35650
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: 1 nothing-special github web page blows browser to almost 4GB
You're still thinking that GIFs are like video. They aren't.
The only "full frame" in an animated gif is frame 0. So no fancy decoding tricks using keyframes or what not would work.
The moment you discard anything from the decoded image you'll have to decode from 0 again.
WONTFIX, indeed.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
Re: 1 nothing-special github web page blows browser to almost 4GB
@MoonChild: I'm just trying to understand, not suggesting you fix anything. I was talking through options to understand what's possible theoretically, not suggesting a pile of new work for you. If it came across that way, it wasn't intended at all. Sorry if it did sound like it.
-
- Pale Moon guru
- Posts: 35650
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: 1 nothing-special github web page blows browser to almost 4GB
No worries, I understood the context. just providing some more feedback, is all.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Moon lover
- Posts: 95
- Joined: 2020-05-01, 13:16
Re: 1 nothing-special github web page blows browser to almost 4GB
Maybe add an option in about:config to prevent loading such dangerous content at all?
-
- Pale Moon guru
- Posts: 35650
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: 1 nothing-special github web page blows browser to almost 4GB
Already exists: image.animation_mode -- set to none to disable GIF animations.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite