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(core): avoid changes Observable creation on QueryList #53498
perf(core): avoid changes Observable creation on QueryList #53498
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The changes Observable (impl: EventEmitter) on the QueryList is initalized lazy - it is created only if someone calls a geter to get a hand on its instance. But the destroy method was calling this getter thus creating a new Observable even if no one subscribed to it. This commit changes the destroy logic to skip creation of an EventEmitter if it wasn't initialized.
2404a94
to
2271332
Compare
This PR was merged into the repository by commit 1fc5442. |
The changes Observable (impl: EventEmitter) on the QueryList is initalized lazy - it is created only if someone calls a geter to get a hand on its instance. But the destroy method was calling this getter thus creating a new Observable even if no one subscribed to it. This commit changes the destroy logic to skip creation of an EventEmitter if it wasn't initialized. PR Close #53498
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…3498) The changes Observable (impl: EventEmitter) on the QueryList is initalized lazy - it is created only if someone calls a geter to get a hand on its instance. But the destroy method was calling this getter thus creating a new Observable even if no one subscribed to it. This commit changes the destroy logic to skip creation of an EventEmitter if it wasn't initialized. PR Close angular#53498
…3498) The changes Observable (impl: EventEmitter) on the QueryList is initalized lazy - it is created only if someone calls a geter to get a hand on its instance. But the destroy method was calling this getter thus creating a new Observable even if no one subscribed to it. This commit changes the destroy logic to skip creation of an EventEmitter if it wasn't initialized. PR Close angular#53498
…3498) The changes Observable (impl: EventEmitter) on the QueryList is initalized lazy - it is created only if someone calls a geter to get a hand on its instance. But the destroy method was calling this getter thus creating a new Observable even if no one subscribed to it. This commit changes the destroy logic to skip creation of an EventEmitter if it wasn't initialized. PR Close angular#53498
…3498) The changes Observable (impl: EventEmitter) on the QueryList is initalized lazy - it is created only if someone calls a geter to get a hand on its instance. But the destroy method was calling this getter thus creating a new Observable even if no one subscribed to it. This commit changes the destroy logic to skip creation of an EventEmitter if it wasn't initialized. PR Close angular#53498
The changes Observable (impl: EventEmitter) on the QueryList is initalized lazy - it is created only if someone calls a geter to get a hand on its instance. But the destroy method was calling this getter thus creating a new Observable even if no one subscribed to it.
This commit changes the destroy logic to skip creation of an EventEmitter if it wasn't initialized.