-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: don't add unload event listener (#18082)
This commit changes how "unload" event is handled - before this commit an event listener was added unconditionally in the runtime bootstrapping function, which for some reason was very expensive (0.3ms). Instead of adding an event listener, a check was added to "dispatchEvent" function that performs the same action (so it's only called if there's an event dispatched).
- Loading branch information
1 parent
9e08d43
commit f9b4304
Showing
2 changed files
with
9 additions
and
11 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
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