Let's start with parsers. Browsers are clever; they use threaded parsing and compilation for both script and other resource types (e.g. CSS)
-
-
Replying to @slightlylate
Those parsers look for resources to fetch (pre-parsing and scanning). When you bake that into script, you defeat that whole system.
1 reply 4 retweets 10 likes -
Replying to @slightlylate
...which means the latency to begin fetching those resources is now much higher in the common case. Of course, you can work around (kinda)
1 reply 0 retweets 8 likes -
Replying to @slightlylate
A bigger toolchain, <link rel="prefetch">, H/2 push, etc. You can get some of it back, but not entirely.
1 reply 0 retweets 8 likes -
Replying to @slightlylate
But it's not just parsers! When you bake, e.g., CSS & templates into script, those things live in the heap. We can't drop them (usually).
2 replies 6 retweets 16 likes -
Replying to @slightlylate
So memory footprint goes up. The code that's generated is only a part of it; the source code stays around in most impls today -- often large
2 replies 1 retweet 9 likes -
Replying to @slightlylate
The larger issue, of course, is script eval is single-threaded. We can't construct (e.g.) DOM off-thread. And script ~10x slower on phones.
2 replies 2 retweets 13 likes -
Replying to @slightlylate
Not all phones, mind. Developers with ~$700 iPhones & Pixels are living in a different world to most folks.
2 replies 5 retweets 19 likes -
Replying to @slightlylate
The most obvious impact is interactivity blocked on script eval. We can't load/run main-thread JS w/o halting input processing.
1 reply 0 retweets 11 likes -
Replying to @slightlylate
But what I'm seeing in traces is how script-based abstraction & dependence is dragging folks away from the impacts of these choices.
1 reply 0 retweets 2 likes
Alex Russell Retweeted Alex Russell
Old news that webdevs who don't know DOM instinctively pull in libs when not needed. We've tech'd up from there:https://twitter.com/slightlylate/status/790991610100101120 …
Alex Russell added,
-
-
Replying to @slightlylate
So when you see folks saying
#usetheplatform, this is what we're talking about. We're not succeeding on mobile w/ current approaches.1 reply 4 retweets 8 likes -
Replying to @slightlylate
Could go on-and-on about the script-first thing: resource fetch priorities, browser scheduling and idle-time control, input processing, etc.
1 reply 0 retweets 3 likes - 5 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.