14:47:59 RRSAgent has joined #serviceworkers 14:48:03 logging to https://www.w3.org/2024/09/25-serviceworkers-irc 14:48:03 RRSAgent, do not leave 14:48:04 RRSAgent, make logs public 14:48:06 Meeting: New Features for the ServiceWorker Performance 14:48:06 Chair: Shunya Shishido, Keita Suzuki 14:48:06 Agenda: https://github.com/w3c/tpac2024-breakouts/issues/17 14:48:06 Zakim has joined #serviceworkers 14:48:06 Zakim, clear agenda 14:48:06 agenda cleared 14:48:06 Zakim, agenda+ Pick a scribe 14:48:07 agendum 1 added 14:48:07 Zakim, agenda+ Reminders: code of conduct, health policies, recorded session policy 14:48:08 agendum 2 added 14:48:08 Zakim, agenda+ Goal of this session 14:48:08 agendum 3 added 14:48:08 Zakim, agenda+ Discussion 14:48:09 agendum 4 added 14:48:09 Zakim, agenda+ Next steps / where discussion continues 14:48:09 agendum 5 added 14:48:09 tpac-breakout-bot has left #serviceworkers 17:06:08 sisidovski has joined #serviceworkers 18:10:20 Keita has joined #serviceworkers 18:10:53 Domenic has joined #serviceworkers 18:11:25 Mek has joined #serviceworkers 18:16:31 jesup has joined #serviceworkers 18:16:57 msw has joined #serviceworkers 18:17:26 ScribeNick: Domenic 18:18:21 noamr has joined #serviceworkers 18:18:24 present+ 18:18:36 nidhi has joined #serviceworkers 18:18:38 present+ 18:18:42 start the meeting 18:18:55 hiroshige has joined #serviceworkers 18:19:18 sisidovski: (presents the slides) https://docs.google.com/presentation/d/1dgpdEVcdfAt0R7lBK6GUcv3AlGna0Avy6E39tvALaxc/preview#slide=id.p 18:19:47 NGaitonde has joined #serviceworkers 18:19:55 krosylight has joined #serviceworkers 18:21:08 jbroman has joined #serviceworkers 18:21:38 sisidovski: FYI the "Cost of ServiceWorker Bootstrap" slides are after some microoptimizations we worked on over the last year 18:23:13 ericaconnell5 has joined #serviceworkers 18:24:42 ericaconnell5 has left #serviceworkers 18:26:34 xiaoqian has joined #serviceworkers 18:33:49 keita: (takes over slide presenting from "Many components in static routing API") 18:37:27 keita: "Proposal for Resource Timing API" slide: origin trial coming soon 18:38:36 sisidovski: "Feedback is welcomed" slide---context on "how to handle unsupported router features" is a network timing condition. 18:39:12 I thought it referred to the Network Information API, which is not supported in all engines? 18:39:32 Keita has joined #serviceworkers 18:39:33 ^ yes that 18:40:19 sisidovski: "Interoperability" context: it's in the SW spec but we'd love to hear about other browser vendors' plans 18:40:49 sisidovski: let's do Q&A now for static routing, then go on to other service worker features 18:41:41 youenn: Apple expressed support last year. We're closer to implementing now. At this point we'd like to know how the WPTs are, what live websites we can test and do measurements on. 18:42:13 youenn: the current scope in the spec is good. We like cache, fetch, and network; not sure about race. If you have measurements showing that it's widely used and widely useful, that would be good for us to know and might impact our plans. 18:43:02 sisidovski: we have WPTs that should cover most behaviors, fully in the web-platform-tests/wpt directory. 18:43:36 Static Routing API demo: https://sw-static-routing-demo.glitch.me/ 18:44:04 WPTs: https://github.com/web-platform-tests/wpt/blob/a19eaaf167389a79c8971fbd25c557965541bdfd/service-workers/service-worker/tentative/static-router/static-router-resource-timing.https.html 18:44:53 chromestatus link using Static Routing API https://chromestatus.com/metrics/feature/timeline/popularity/4711 18:45:09 Domenic: youtube.com is a good one 18:46:00 but https://cocreate.wildgoosefestival.org/ shows up on chromestatus too XD 18:46:28 sisidovski: no current stats on race, only a few sites use it, but we can work on getting more data 18:46:54 wanderview: from my experience youtube loves cross-browser support so would be excited to work with WebKit 18:46:58 WPT tests: Most of the static router WPTs are moved out of /tentative. e.g.) https://github.com/web-platform-tests/wpt/blob/a19eaaf167389a79c8971fbd25c557965541bdfd/service-workers/service-worker/static-router-main-resource.https.html 18:47:47 Masakazu has joined #serviceworkers 18:48:36 Erik: at the lower levels of the network connections we race, but the principle that makes this OK is that we only do multiple things in parallel in the exceptional case, not the common case. Is there anything we should do in this context so that if people chose the race rule, are we expecting that once this gets to the worker it does one network request instead of two? Is there a way to bias this e.g. give the worker a 5 ms 18:48:36 headstart? Some way of ensuring that 80% of the time we're not doing twice as much work? Bringing up the network has power, CPU cost 18:49:50 wanderview: in the past at Mozilla they introduced racing between HTTP cache and network (outside of service worker). This gave benefits. In general the long tail devices can benefit from this. Safari devices might not have as much of a benefit. 18:50:09 Erik: we do spend a good amount of effort on the oldest devices 18:50:38 Erik: some of the efficiency concerns depend on what the service worker will do after the race 18:50:51 ???: we see network winning on SSDs too, not just old devices. 18:51:06 s/???/Randall Jesup/ 18:51:22 s/Randall/Randell/ 18:51:55 youenn: sometimes we race service worker and network when the service worker is not running in Safari today. A race between JavaScript and networking. Hopefully the UA is free to not race if it thinks it's a bad deal. 18:52:30 Erik: probably not generally a huge concern, we just should think about it and allow some leeway for UAs to do the right thing, or be sure that following the spec exactly is not a big problem 18:53:00 youenn: for subresource cases races are often fine 18:53:07 sisidovski: (moves on to "New ideas" slides) 18:53:22 asuth has joined #serviceworkers 18:58:29 https://github.com/explainers-by-googlers/service-worker-auto-preload 19:01:39 sisidovski: "ServiceWorker Synthetic Response" slide: API shape not settled yet but the basic idea of providing some stuff ahead of time via static routing API is like this. 19:07:46 wanderview: have you thought about what happens if the network response does something contradicting, e.g. redirecting to a different origin? 19:08:15 sisidovski: we want to err on the safe side, so we'd discard the committed renderer process, basically restart the navigation. 19:09:16 jbroman: there are a long list of headers to handle, e.g. Location, Content-Disposition, Content-Type. Content-Security-Policy. Network interruptions. 19:10:00 youenn: if the idea is to give a hint for process swap, I think it's fine to give a hint to the UA. If the idea is to go further and start doing rendering and so on, I'm less sure about that. It's also interesting to measure how much benefit this gives. 19:10:28 Domenic: can you give more detail on what Chrome does before commit? 19:11:00 sisidovski: process allocation, "local frame context initialization"... 40 ms median time on Android. 19:11:41 wanderview: your AppShell slide reminds me of early days of ServiceWorker where Facebook would stream the head of the document from cache, and stream the rest of the body from network. They said it was a significant win at the time. Moving something like this into the browser could be a big win. Reduce complexity. 19:12:20 Domenic: any thoughts about service worker auto preload? 19:13:46 youenn: seems good. We're doing something similar. The heuristic is different but the principle is the same. Our current heuristic is whether service worker is running or not running, targeting navigations not subresources. We're interested in hearing measurement results and websites where tweaking the heuristic would help. 19:14:14 RRSAgent: generate minutes 19:14:16 I have made the request to generate https://www.w3.org/2024/09/25-serviceworkers-minutes.html Domenic 19:14:24 RRSAgent, make minutes 19:14:25 I have made the request to generate https://www.w3.org/2024/09/25-serviceworkers-minutes.html xiaoqian 19:14:31 RRSAgent, make log public 20:08:23 xiaoqian has joined #serviceworkers