Randy, when you remove ResourceScheduler, do you have any need for frame-based data on the IO thread? I'm guessing no but I'm not completely sure.
I think for the most part my questions can be answered by what's already been said earlier. It sounds like you want to store a frameid->tabid mapping that's accessible on the IO thread, and used for prioritization?
I think that's straightforward except for the window.open case, where we see the rfh of the frame id created before the WebContents. So we'd need to do something there to obtain a tabid value to put in the FrameIOData (whatever value we get, we can forward as a param to the UI thread). Is there a particular existing tab identifier were you targeting for this?
Prerendering may also be a complication, depending on what behavior we need there.
What about the idea to just tag resource requests from the renderer with a main frame id? We already tag them with the parent frame's id. This would get us away from having to maintain the mapping.
Renderer processes never know routing ids of other processes. Each renderer involved in a WebContents will have a routing id that represents the main frame, but it's a RenderFrameProxy route id for the subframe processes, and different for each process -- that's probably not really useful for grouping requests on the IO thread.Also, the main frame id can change over the lifetime of a tab (but not the lifetime of a subframe). And two main frame ids can be alive at the same time for the same tab, as far as the network stack is concerned (e.g. xhr from an unload handler during a cross process navigation).If we want something consistent to use for grouping requests by tab, we've floated the idea of using the root frame tree node ID as a tab identifier, which is globally unique, and invariant over the lifetime of a WebContents. Corner cases are: interstitials (where we have a separate FrameTree for the overlay), webview tag (allows a webcontents to contain another as an html element, so there are effectively multiple roots per tab), and prerendering (where a tab swaps its webcontents with a prerendered graft).