I'm very curious to watch how WeakMap behaves and how it is visualized in this tool!
Speaking of WeakMap, perhaps a Firefox engineer could satisfy my curiosity on this subject. What is the algorithm Firefox uses to release weakly held references? Or, perhaps better restated: how aggressive is Firefox in holding on to weakly referenced objects?
When the majority of new JS memory allocations on a page get placed into WeakMaps, does Firefox always continue to allocate memory from the host OS, or is there some threshold where it starts to let things slip? Also, is there any rhyme or reason to what gets released first from WeakMaps?
Can Firefox run wild like it does with strongly held references, allocating into WeakMaps until the host OS cannot satisfy new native memory allocation requests and only then start to release weak references?
Also, how crazy do things get for you when you put lots of DOM objects or, even worse, GPU-backed memory structures like CanvasPattern into a WeakMap? Please share cool war stories! ;)
Disclaimer: I have not used WeakMap in any serious capacity, so I don't know what I'm talking about.