Template Conditional Logic vs. Dynamic Templates -- Performance Comparisons

Hey fellow meteorites!

Just wondering about the performance of conditional logic templates vs dynamic templates.

Let’s say I need to check the value of field (of which there are three possible values) and display different html as a result.

  1. The conditional logic way
    Keep one template and have something like this pseudocode

    {{#if value1}}

    {{else}} {{#if value2}}
  2. The dynamic way
    Set a reactive var for value of the field, pass it as the template name to a dynamic template

I know I am being a little nitpicky here but was just wondering if anyone had some opinions on this ??

Thank you and look forward to your response :slightly_smiling:

The dynamic way is obviously cleaner code and DRYer. But, as for performance, I think this distinction is largely irrelevant, as you’re going to feel the hurt in performance in other places long before this becomes an issue.