Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize the AST transform for top-level elements
Don’t bother to convert top-level elements into dynamic calls if they aren’t the top-level element *of a template*. Consider a template like this: ``` {{#each posts as |post|}} <div>hello</div> {{/each}} ``` The previous version of the transform would convert the nested template (the <div>) into a dynamic call, because the AST transformation didn’t differentiate between top-level templates and nested templates. It didn’t have any other effects (the dynamic call is required to restore the semantics of the original static form) but it unnecessarily bloats templates and makes execution slower.
- Loading branch information