Should I be using knownHelpers?


Handlebars.precompile supports a knownHelpers hash. Ember.Handlebars.precompile doesn’t; instead, it uses helperMissing and dynamic helper lookup via the Container.

Isn’t is slower to keep doing this lookup? I know helperMissing registers the helpers it finds, but that doesn’t help the precompiled templates – they’re hardcoded to use helperMissing:

else if(stack3=== undef) { stack1 =, "my-helper", stack2, tmp1); }

Of course, the lazy helper/component lookup makes boot time faster. It’s definitely a trade-off.

Ember.Handlebars.precompile doesn’t support the knownHelpers hash, though it’s easy to monkey-patch it to do so. Has anyone tried this? How did the boot-time slowdown compare to the runtime speed-up?