Open Bug 1721122 Opened 2 months ago Updated 2 months ago

Uncontrollable memory usage grow


(Core :: DOM: Core & HTML, enhancement)

Firefox 89





(Reporter: RostyslavLogvinov, Unassigned, NeedInfo)



(6 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36

Steps to reproduce:

Steps to reproduce:

We've made a test app to reproduce a memory leak problem during loading/removing iframes 'n' - count abot 30 iframes into a table where each iframe is a representation of column with 'url' data in it.
There is a large jump in memory and energy consumption in case loading / removing of each iframe in 'about: performance' observator.
Also a high memory consumption level when deleting an iframe in 'about: memory'

iframe creation example :

    const createIframe = (url, name) =>{
        iframe = document.createElement('iframe') = name
        iframe.src = url
        iframe.width = '100%'
        iframe.height = '100%'

We need to know and understand if it is normal that after a long time of FireFox usage with 'Iframes' (about 30) in one app it takes up so much memory that 'setInterval' stops working and memory usage increases up to 7Gb RAM ?
Is there a bug or wrong method usage ?
How could this be avoided ?
Is there any kind of solution to resolve such kind of problem ?

Cause on other browsers this case is less affected

Actual results:

As a result the memory grows and grows overtime which results in degraded performance.

Expected results:

loading or removing iframe from DOM without giant uncontrollable memory usage grow

The same mechanism does not occur on Chrome or Edge.
For FireFox version 68 there was a disconnection with usage about 2GB and FireFox version disconnection with usage about 89.0 7gb.
Edge after a long time consumes from 3.5 GB to 4GB and remains at this level without disconnecting instaed of Chrome Last version has not to be confirmed yet .
Screens with memory usage are below.

Please enter the address
in the address bar and attach (using the "Attach New File" link above) the output here.

Flags: needinfo?(RostyslavLogvinov)

Hey rotsy,
Can you test the issue while in Safe Mode? You can find helpful info here : .
Also a fresh new profile could help. You can find more about creating a new profile here : .
If possible, you can test this issue on the nightly build as well. Download the build from : .

Adding about:memory verbose

Flags: needinfo?(RostyslavLogvinov)

(In reply to Andre Klapper from comment #7)

Please enter the address
in the address bar and attach (using the "Attach New File" link above) the output here.

I'd added what You asked for

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

(In reply to RostyslavL from comment #0)

Do you have a page where we could reproduce this? This is obviously not expected (unless you're keeping the iframe's window alive with JS somehow, like storing it in a global or what not).

Flags: needinfo?(RostyslavLogvinov)
You need to log in before you can comment on or make changes to this bug.