-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(internal): optimize Subscription#add() for the common case (#4489)
This removes unnecessary checks on the `teardown` parameter upfront, and instead moves these checks into the appropriate branches guarded by the type check. This way we get the same behavior, but with fewer checks and smaller code size. Also optimize adding the child `subscription` to `this._subscriptions` for the common case that there were no previous subscriptions.
- Loading branch information
Showing
1 changed file
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters