discourse/app/assets/javascripts/discourse-common/addon
David Taylor 7ed6195f19
PERF: Stop eagerly-loading core helper modules (#24015)
Now that core has a file structure and default imports, Ember's resolver can load helpers lazily. So we can remove the lazy loading, and helpers in ember templates will continue to work. This should provide a slight performance improvement for initial boot.

However, there is a slight complication: some of our helpers are also registered with our Raw Handlebars system as a side-effect of loading the module. Therefore, this commit adds a `helperMissing` helper to our RawHandlebars system. This looks up the helper by name in the ember resolver, which triggers the relevant module to be evaluated, and the raw helper to be registered as a side effect.

For backwards-compatibility, plugin and theme helpers continue to be eagerly evaluated. Once the `discourse.register-unbound` deprecation is resolved, we can safely remove this eager loading.
2023-10-19 15:52:51 +01:00
..
config Revert "FIX: delay custom section reorder (#20781)" (#20786) 2023-03-23 11:27:12 +01:00
helpers DEV: replace registerUnbound usage with default exports (#23802) 2023-10-19 14:28:25 +01:00
lib PERF: Stop eagerly-loading core helper modules (#24015) 2023-10-19 15:52:51 +01:00
utils DEV: Sort imports 2023-10-10 21:46:54 +01:00
.gitkeep DEV: Make `discourse-common` an Ember addon. (#9578) 2020-04-29 12:18:21 -04:00
resolver.js DEV: Sort imports 2023-10-10 21:46:54 +01:00