We root way too much in DOM. Let's not do that.
Magic DOM might fix a lot of problems here, and we're not certain what the performance hit of this is, so we shouldn't really do anything about this until after that. This is more of a dump of all the ideas that came up in this discussion.
There are lot of .root()
s left over from the pre-dereffable-JS<T>
era. These are transitively rooted and aren't being moved, so just using Deref should work. Simple escape analysis can catch these.