I switched the Ajax approach for my courses platform from XHR to fetch(), and it's noticeably faster.
@slightlylate told me once that it would be, but it was still unexpected how much faster it actually is (since XHR is older and, theoretically, has been optimized highly).
-
-
Curious whether the implementation is using a streaming JSON parser (and whether would actually makes sense given average JSON payload and packet sizes).
-
We don't have a streaming parser in V8 today, but the async nature of `let json = await (await fetch()).json();` lets us put the decode into the task scheduling queue rather than forcing it to happen whenever you happen to get bits back.
- 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.