Comparison between binding syntax

when binding attributes to values, what is considered better? (performance, memory etc.)




is there any difference if the target of the binding is a native attribute, or a custom one?

(I want to bind a LOT (~10,000) of items, and I try to earn every bit possible.

1 Like

There are two sides:

  • initialization
  • update

They are not necessarily exclusive.

For initialization, placeholder.bind="placeholder" would be way faster: simpler binding initialization.

For update: would need real bench for this, but from following two relevant blocks: I would bet on normal binding.

That said, when you have 10k rows, things are going to be very difficult already

Can someone explain to me why with binding-expression we only update if newValue !== oldValue while with interpolation-expression we always update?

1 Like

How it looks like inside update target of interpolation expression

You can see we always try to avoid update DOM unnecessarily. in binding expression, the position of the check is just different.