display-locking icon indicating copy to clipboard operation
display-locking copied to clipboard

Support the use-case of maximal memory efficiency

Open chrishtr opened this issue 6 years ago • 3 comments

In examples such as https://github.com/domenic/infinite-list-study-group/issues/8, it is critical to be able to minimize memory of a large code file by avoiding rendering-related data structures. If these turn out to lead to memory use more than 2x or so the memory for strings of text in the code file, we would need to add functionality to allow the developer to evict rendering state for offscreen content.

chrishtr avatar Feb 06 '19 05:02 chrishtr

My reading of that was that they don't even want the DOM around when it's not needed (which presumably would take care of evicting rendering-related structures). That said, having the browser proactively reclaim memory from invisible parts of the screen seems reasonable but I'm not sure that we'd want it to be under control from JS, it's just something the browser could do when it feels like it (.e.g when we start getting memory pressure signals on mobile).

fergald avatar Feb 06 '19 05:02 fergald

What they didn't want was to run out of memory. The use-case also explicitly said that it would be good to support find-in-page.

chrishtr avatar Feb 07 '19 01:02 chrishtr

I wonder if for content-visibility: auto if we should have evict memory objects if we're far enough off-screen

vmpstr avatar Sep 07 '21 20:09 vmpstr