discourse/app/assets/javascripts/discourse-common/addon
David Taylor e6ab8f5b71
DEV: Re-use main app registry for raw HBS view lookups (#15456)
da6edc1 introduced the `lookupView` method, which initialized a fresh resolver, and used it to directly look up raw-views (with no caching). This worked well, but was not a clean solution. It required initializing an entirely new resolver, and did not have any caching.

This commit updates the `helperContext` to include access to the registry, and uses it to perform raw-view lookups. As well as re-using the registry, this also means we're making use of the resolver's built-in cache.

I haven't been able to measure any noticeable performance impact from this change, but there is certainly less work being done, so it may be beneficial on older devices.

Co-authored-by: Ayke Halder <rr-it@users.noreply.github.com>
2022-01-05 22:22:13 +00:00
..
config DEV: Sync up more Ember CLI features (#11790) 2021-01-21 15:55:39 -05:00
helpers DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
lib DEV: creates domFromString utility function (#15310) 2021-12-17 09:25:34 +01:00
utils DEV: drops jquery from scrolling-post-stream (#15313) 2021-12-17 14:52:42 +01:00
.gitkeep DEV: Make `discourse-common` an Ember addon. (#9578) 2020-04-29 12:18:21 -04:00
resolver.js DEV: Re-use main app registry for raw HBS view lookups (#15456) 2022-01-05 22:22:13 +00:00