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

perf(EventManager): Event subscription speedup using Plugin cache #12824

Closed
wants to merge 3 commits into from

Conversation

ferhatb
Copy link
Contributor

@ferhatb ferhatb commented Nov 12, 2016

What kind of change does this PR introduce? (check one with "x")

[x ] Refactoring (no functional changes, no api changes)

What is the current behavior? (You can also link to an open issue here)
On every event subscription, event manager searches all plugins.
Dom events plugin is last in list of plugins, therefore each subscription goes through .supports(eventName) calls unnecessarily after the first lookup. This change caches them to efficiently bypass the search.

What is the new behavior?
Once we know which plugin serves an event type, it is cached.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

Dom events plugin is last in list of plugins, therefore each subscription goes through .supports calls unnecessarily after the first lookup. This change caches them to efficiently bypass the search.
@vicb vicb added action: merge The PR is ready for merge by the caretaker pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: merge The PR is ready for merge by the caretaker labels Nov 12, 2016
vicb pushed a commit to vicb/angular that referenced this pull request Nov 12, 2016
@vicb vicb closed this in #12826 Nov 12, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants