[webkit-help] Detach the RenderTree when user navigates to a new page - an idea to reduce memory?

ying lcs yinglcs at gmail.com
Tue Feb 16 23:05:15 PST 2010


I have read this blog regarding creating/destorying RenderTree
http://webkit.org/blog/114/webcore-rendering-i-the-basics/. And I
think RenderTree is generated from DOM (after html page is parsed and
JS is executed).

To reduce memory usage when user have navigated multiple pages, I am
thinking if it is a good idea to
* whenever user clicks 'back', detach the whole RenderTree, so that
all the memory used by RenderTree is free. Webkit just keeps the
DOM/CSS data structure/Javascript context.
* when user 'forward' and bring back that page, the RenderTree will
re-construct again, based on the DOM which is preserved.

I am not sure if this simplifies things too much. I would like to know
if such idea is feasible/makes sense?

Thank you for suggestions/corrections.

More information about the webkit-help mailing list