right, but that's effort that most people aren't going to go to. No-one at Twitter has 'make Twitter easier to scrape' on their TODO list —
-
-
and therein lies the problem. The web used to be friendly to this stuff by default, but modern tooling means it has to be a conscious effort
6 replies 0 retweets 7 likes -
Some Google toolchains rename classes by default because (1) performance (shorter names) & (2) obfuscation are requirements on the todo list
1 reply 0 retweets 1 like -
Replying to @theefer @Rich_Harris and
Note that's using "normal css" (or gss/sass), not css-in-js.
1 reply 0 retweets 1 like -
If you're *required* to obfuscate that's a whole 'nother matter. Am sceptical about the perf thing — after gzip, we're probably talking
1 reply 0 retweets 0 likes -
Replying to @Rich_Harris @theefer and
about miniscule byte gains, no? and the length of a class name surely doesn't affect the CSSOM?
1 reply 0 retweets 0 likes -
I'll see if I can compare payloads with renaming vs without, both pre and post gzip.
2 replies 0 retweets 0 likes -
Replying to @theefer @Rich_Harris and
Intuitively would expect all class names would need to reside in memory at least once per name, but IANA browser engineer /cc
@slightlylate1 reply 0 retweets 0 likes -
I mean, unless your classnames alone run into the 100's of Kbs then it seems unlikely to matter... but IAANABE
1 reply 0 retweets 0 likes -
Replying to @Rich_Harris @theefer and
Style resolution is a lot of string comparison. Shorter strings == faster comparisons. But what's even faster is local (scoped) styles.
1 reply 0 retweets 5 likes
So the pro-move is to use Shadow DOM and scope your CSS to your component.
-
-
Replying to @slightlylate @Rich_Harris and
Ah interesting, I hadn't thought of the strcmp aspect - thanks! Would love to use real scoped styles, but not an option atm sadly.
1 reply 0 retweets 0 likes -
Replying to @theefer @Rich_Harris and
Earlier engines (circia IE6/IE7) used pretty naive comparison. Modern engines are a bit more sophisticated: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/SelectorFilter.h?l=58 …
0 replies 0 retweets 1 like
End of conversation
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.