03:24 | <littledan> | We had a very good conversation at the end of the day yesterday with Anne VK (Apple), Ollie (smaug from Mozilla), Yoav, Domenic (Google), and Andreu about AsyncContext. Some results: • everyone came to understand each other better, eg about what AsyncContext is and why it is useful • smaug continues to be concerned about memory usage in an extremely general way. I am pretty convinced that no WeakMap in the mix will just not fix things here, and no one really defended that particular mechanism. I don’t see a way to follow up on this concern as it is very general, just based on experience of websites doing memory leaks. It is important that devtools gives good mechanisms to see what closes over what, including asynccontext snapshots, to help people debug memory leaks. • Googlers have repeatedly raised this question of the appropriate venue to do this work. Yoav and I agreed that it could be done in either place and it’d be fine—there just aren’t huge technical differences. No one had a strong argument to push for a change, and Apple and Mozilla didn’t seem opinionated one way or another, so we will just leave things as is for now. • Domenic was concerned that task attribution didn’t correspond to AsyncContext because he thought that task attribution would use caller semantics rather than register semantics; Yoav clarified that it actually often needs register semantics. We will need to do a case analysis to confirm, but there continues to be cautious optimism here about how asynccontext and task attribution need the same sort of thing. • As far as what the semantics should be for when to use caller vs register semantics: Domenic pushed for a strong default that everything uses register semantics, except for a limited list of exceptions that we will figure out. I like this idea. He tried to get a read from other browsers about whether this makes sense for them, but they weren’t prepared to answer. Yoav isn’t sure whether we can do this at the callback level due to previous evidence of overhead, but that was coupled to creating task attribution nodes and we need to measure this separately. We will need to do this case by case study of which web APIs should use caller vs register semantics to confirm—no one feels like they have a complete picture. |