Data could be wrong in some way, but something like 20% of SWs are > 85K (unzipped, on disk, including importScripts() deps). What the heck are y'all putting in there?
-
-
Replying to @slightlylate
The root skeleton sw-precache spits out, with sw-toolkit, is 27K. So one fifth of all service workers being more than three times that doesn't seem unreasonable.
2 replies 0 retweets 3 likes -
Replying to @AdamRackis @slightlylate
I mean these are low-level primitives—here's 5.6K of sw code that does little more than jack shit (primitive offline sync to indexedDB, w/ image pre-caching) Any serious work would almost certainly use abstractions like Dexie, etc, which I'm sure add up https://github.com/arackaf/booklist/blob/feature/pwa-features/react-redux/sw-manual.js …
1 reply 0 retweets 1 like -
Replying to @AdamRackis
Yeah, this seems like a place for us to watch closely. Seeing where people spend their code budget is a great place to figure out where to improve the platform.
1 reply 0 retweets 0 likes -
Replying to @slightlylate
Doesn't SW code download, parse, and execute on a background thread? I'd think this would be an ok place for slightly larger code.
1 reply 0 retweets 0 likes -
Replying to @AdamRackis @slightlylate
We have feedback from sites that service worker startup time is a problem. Working on improving, but large scripts don't help.
2 replies 0 retweets 1 like -
Replying to @wanderview @AdamRackis
In our architecture it doesn't seem to hurt much (we have other, bigger problems)...but I expect it's going to be an issue SRTL. Was investigating the data to see how large.
2 replies 0 retweets 1 like
Specifically, there's a plan from @horo to be even more aggressive about compiling the SW code (which has a disk-size impact). I'm pretty excited about the potential there.
-
-
Oh wow - Dexie, the "minimalistic" wrapper for IndexedDB is 57K minified. So yeah, your numbers from above definitely don't seem surprising imo. /
@wanderview1 reply 0 retweets 0 likes -
- 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.