PSA: embedding/applying CSS in JS is the surefire way to be on every slow path. Bloats memory, slows parsing & use, hurts caching. Avoid.
It blows a lot more memory than ordinary CSS. And yes, if it's strings in JS that you then assign to DOM, it's different to "regular" JS
-
-
I do not assign those objects to ordinary DOM nodes, but rather inject those objects into Style tags in the head
-
Yep, so you're adding them to the DOM. They get "interned" in shared Blink/JS heap space. Not "ordinary" cost.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.