Skip to content
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

[REFACTOR] Split managers into multiple maps #19159

Merged
merged 1 commit into from
Sep 27, 2020

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Sep 27, 2020

This refactors managers to split different types of managers into
different maps per-type. This allows more than one type of manager to
be associated with a given definition. For instance, this is a useful
capability for helper and modifier managers to have, since helpers and
modifiers have a lot in common and may end up being able to share
implementations.

This also upstreams the deduplication logic from Glimmer.js, which was
more stringent than in Ember. In Ember, we currently create one instance
of a given manager per-component-definition, whereas in Glimmer.js, we
create one per-factory/owner combination. Given that managers are
generally encouraged to be mostly-stateless in general, this change
shouldn't be a problem, and should be slightly more performant in apps
with many component definitions.

This refactors managers to split different types of managers into
different maps per-type. This allows more than one type of manager to
be associated with a given definition. For instance, this is a useful
capability for helper and modifier managers to have, since helpers and
modifiers have a lot in common and may end up being able to share
implementations.

This also upstreams the deduplication logic from Glimmer.js, which was
more stringent than in Ember. In Ember, we currently create one instance
of a given manager _per-component-definition_, whereas in Glimmer.js, we
create one _per-factory/owner combination_. Given that managers are
generally encouraged to be mostly-stateless in general, this change
shouldn't be a problem, and should be slightly more performant in apps
with many component definitions.
@pzuraq pzuraq force-pushed the refactor/split-managers-into-multiple-maps branch from bbe2614 to cce03c2 Compare September 27, 2020 22:19
@rwjblue rwjblue merged commit 984e69c into master Sep 27, 2020
@rwjblue rwjblue deleted the refactor/split-managers-into-multiple-maps branch September 27, 2020 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants