Closed wfjsw closed 4 months ago
Hey @wfjsw, I can't really say I like this, because I can imagine cases, where the element list might not be cleaned at all (e.g. some element perodicaly re-rendering more often than 500ms). I think there should be some guarantee that elements will be cleaned at some point. Also when we're gathering context from the page, it should be cleaned before it, because it should not take irelevent elements into consideration.
One of the alternatives I could see here is to make an informed decision in cleanElementInactiveNodes
by the MutationRecord.removedNodes
What I currently have here:
Superseded by #3296
Add a debouncer to
refreshAll
to decouple it off the MutationObserver hot path, to hopefully bring better performance.