mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
e6ab8f5b71
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>