New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 678233 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

innerText causes memory leaks

Reported by federico...@gmail.com, Jan 4 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

Steps to reproduce the problem:
1. Open the test case (or http://s.codepen.io/FezVrasta/debug/pRomWL)
2. Open the dev tools and go to timeline
3. Refresh the page to let the timeline capture start
4. Watch the result of the capture

What is the expected behavior?
A low number of nodes is present in the capture timeline

What went wrong?
An impressive number of nodes is detected

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 55.0.2883.95  Channel: stable
OS Version: OS X 10.12.2
Flash Version: Shockwave Flash 24.0 r0
 
bug-innertext.html
179 bytes View Download
Screen Shot 2017-01-04 at 2.37.41 PM.png
182 KB View Download
To be more clear, the problem is that those detected nodes becomes detached and hang in the memory. I wouldn't expect `innerText` to create a new node, or at least, it should take care to deallocate the previous one if it creates a new one.
Labels: Needs-Triage-M55
Components: Blink>MemoryAllocator>GarbageCollection
Labels: Needs-Feedback
Owner: dominicc@chromium.org
The innerText spec requires us to create a new node; reusing a node isn't really a feasible or good idea.

FWIW in Chrome 55.0.2883.87 (Official Build) (64-bit) I never got that many (thousands) on nodes in my trace.

Having a lot of nodes in memory isn't necessarily bad. It may be better to delay collecting them to get through that loop so the system can be responsive again sooner. (Not saying the heuristic is necessarily tuned to do that; just that transient number of nodes isn't necessarily a bug.)

Does the node count drop back down after a bit?

What's the specific problem with a large number of nodes in this case?
as far I can see, the number of nodes never drop..it reaches a number and
never grows further.

in my case the problem was that all these nodes in memory caused lags.

Comment 5 by dominicc@google.com, Jan 11 2017

Status: WontFix (was: Unconfirmed)
I'm sorry but I can't seem to reproduce this in Chrome on Mac 57.0.2978.0, I see dozens of live nodes at most.

If you can quantify the lags you were seeing and help us reproduce the problem that would be wonderful.

Sign in to add a comment