Not sure what you're buying. The CSS is still a JS string that is getting passed from the JS to DOM. Better off disabling a stylesheet?
-
-
Replying to @slightlylate @threepointone and
And I don't know what Fiber does for you here (aside from fewer janky frames overall). Total work the same.
1 reply 0 retweets 0 likes -
Replying to @slightlylate @threepointone and
Is "double parse" what happens when CSS strings are embedded in JS like Webpack does?
2 replies 0 retweets 0 likes -
Replying to @sebmarkbage @slightlylate and
If the CSS string is loaded from XHR, substr, then inserted. Does that avoid the problem or is Chrome's CSS parser unable to use the string?
1 reply 0 retweets 0 likes -
Replying to @sebmarkbage @threepointone and
You've still pulled it into the JS engine first. Again, not a huge cost, but I'm not sure why you *would* do it. Paying lots of costs.
3 replies 0 retweets 3 likes -
Replying to @slightlylate @threepointone and
I'm suspecting style.cssText and using cloneNode can be more efficient than large files w/ selectors in some scenarios. Experimental tho.
1 reply 0 retweets 1 like -
Replying to @sebmarkbage @threepointone and
cloneNode + shadow DOM's is a HUGE win. We de-dupe rules inside shadows & use separate (faster!) resolver.
1 reply 0 retweets 3 likes -
Replying to @slightlylate @threepointone and
With style sheets it is difficult to be granular, bc the overhead of network/DOM per sheet, so you end up parsing rules you don't use.
1 reply 0 retweets 1 like -
Replying to @sebmarkbage @threepointone and
...but that stylesheet construction is going to be faster than doing this through JS until you get a *very* large stylesheet.
2 replies 0 retweets 2 likes -
Replying to @slightlylate @threepointone and
That's where the problem space gets interesting. Finding the sweet spot where it matters and fixing the bottlenecks that makes it slow now.
1 reply 0 retweets 2 likes
Strongly recommend you look at Shadow DOM + cloneNode for shared chunks.
-
-
Replying to @slightlylate @sebmarkbage and
Do you have any reading material on this? Or does it just refers to shadow dom being fast and encapsulated?
1 reply 0 retweets 0 likes -
Replying to @wardpeet @sebmarkbage and
I don't know of articles on it;
@ElliottZ might3 replies 0 retweets 0 likes - 13 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.