Hard to put into words how utterly broken JS-first web development is. So many parts of the system work against you when you take the reins.
-
-
Replying to @slightlylate
Let's start with parsers. Browsers are clever; they use threaded parsing and compilation for both script and other resource types (e.g. CSS)
2 replies 5 retweets 10 likes -
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
please fix :) I’d like to say: I don’t care what fn.toString() does. Please release what you can.
1 reply 0 retweets 0 likes -
Replying to @cramforce @slightlylate
with V8 eventual new compiler toolchain, that should save a lot of RAM. PS: Not arguing with the wider point, of course :)
1 reply 0 retweets 1 like
: I hear future work may allow swapping source strings out of the heap; very excited about that, but not here yet.
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.