In a <template repeat> with a lot of nested templates, this call to MutationObserver.observe shows up as a small but not invisible part of the time spent. This is not a huge deal (5ms out of 425ms in the case I'm looking at, with 550 templates), but given how rarely ref is used (and even more rarely mutated), this seems like unnecessary overhead. One could imagine delaying the observation with a setTimeout.
In a
<template repeat>
with a lot of nested templates, this call toMutationObserver.observe
shows up as a small but not invisible part of the time spent. This is not a huge deal (5ms out of 425ms in the case I'm looking at, with 550 templates), but given how rarely ref is used (and even more rarely mutated), this seems like unnecessary overhead. One could imagine delaying the observation with a setTimeout.