Attached snippet generates 1M lines of text in chunks 50 lines each (<10Mb of data in total). With pretty much nothing in the JS heap, resulting tab takes ~450Mb of heap.
Detaching content does not release much memory, repeating the procedure does not go beyond 450Mb though.
Sounds like allocating InlineBox takes all the space. I trimmed one bit from the m_expansion to fix alignment (11 -> 10) and it saved ~10% of heap (450->410). Attaching the pprof picture taken after the change.
Created attachment 102934 [details]
Created attachment 102935 [details]
[IMAGE] Memory snapshot graph.
Downstream bug: http://code.google.com/p/chromium/issues/detail?id=89400
Sizes (linux 64):
sizeof InlineBox 64
sizeof InlineTextBox 88
sizeof RenderObject 56
sizeof RenderText 96
1939910*88 + 2919865*64 = 357583440
> 1939910*88 + 2919865*64 = 357583440
k, k, i should not have been adding them up :P
We have bug 19986 tracking a similar issue.
This is no longer the case. Woot! WebContent process now uses only 62MB!
This was fixed by simple line layout. We no longer create inline boxes in basic cases like this.