Indirect Tags versus Tag() function

Every difference in behavior between the tag() function and indirect tag bindings is a negative against the tag() function.

  • tag(), like any expression function, must deliver an answer in the thread that is running the whole expression. But on expression startup that means waiting on the tag subsystem to establish the subscription and deliver the initial value. This creates stalls. Indirect tag bindings deliver asynchronously.

  • The string expression within the parentheses of tag() must re-execute every time tag() delivers a value, or anything else in the expression changes, whether the string would produce a new result or not. Indirect bindings' string source only re-executes when a fragment changes. (You can mitigate by moving the string computation to another custom property, but if you can do that, you might as well move the whole thing.)

Use tag() only where indirect binding is unavailable (expression tags).

4 Likes