Skip to content

PERF: Introduce lazyHash and update PluginOutlet calls to use it #32823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

davidtaylorhq
Copy link
Member

This is a more efficient version of {{hash, where the values are only evaluated when they're actually accessed

Also bumps @discourse/lint-configs, which now includes an ember-template-lint rule to ensure {{hash}} is not reintroduced

@github-actions github-actions bot added the chat PRs which include a change to Chat plugin label May 20, 2025
This is a more efficient version of `{{hash`, where the values are only evaluated when they're actually accessed
We don't actually need a proxy, since the set of keys on an internalHelper can never change
}

// Like ember's builtin hash helper, but instead of returning a reified object
// every time its referenced, it returns a static proxy object with auto-trackable keys.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// every time its referenced, it returns a static proxy object with auto-trackable keys.
// every time it's referenced, it returns a static proxy object with auto-trackable keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat PRs which include a change to Chat plugin
Development

Successfully merging this pull request may close these issues.

2 participants