When creating interpolators in transition.style and transition.attr, we could check if the start and end values are the same as the previous node, and if so, reuse the previous interpolator. This is a very simple heuristic that would optimize the common case of selecting multiple nodes that share the same start & end values.
Likewise, when creating a tween in transition.styleTween and transition.attrTween, we could check if the current interpolator is the same instance as the previous interpolator, and if so reuse the previous tween.
When creating interpolators in transition.style and transition.attr, we could check if the start and end values are the same as the previous node, and if so, reuse the previous interpolator. This is a very simple heuristic that would optimize the common case of selecting multiple nodes that share the same start & end values.
Likewise, when creating a tween in transition.styleTween and transition.attrTween, we could check if the current interpolator is the same instance as the previous interpolator, and if so reuse the previous tween.