Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(platform-browser): disable styles of removed components instead …
…of removing This commit changes the behaviour of `REMOVE_STYLES_ON_COMPONENT_DESTROY` in 2 main ways: - `style` nodes are disabled instead of removed from DOM. This causes the same runtime behaviour but avoids recomputations when the stylesheet is re-added when the component is re-created. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/css/css_style_sheet.h;l=266;drc=31fb07c05718d671d96c227855bfe97af9e3fb20 - `style` nodes of components with `ViewEncapsulation.Emulated` are neither removed nor disabled. This is because such styles from such components cannot leak and effect other components. NB: This changes is being done following some performance bottlenecks observed in Phanteon and their own recommendations. Context: http://chat/room/AAAAxKxTk40/jaP6Lj6fhmQ/jaP6Lj6fhmQ https://crbug.com/1444522 http://b/289992821
- Loading branch information
1 parent
fb3e6d6
commit e3d9560
Showing
3 changed files
with
124 additions
and
113 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
Oops, something went wrong.