After https://crrev.com/c/963405 parallel navigations in 2 or more profiles can cause the spare RenderProcessHost to be repeatedly and uselessly created for profile A, needed for profile B so discarded and recreated for profile B, needed for profile A so discarded and recreated for profile A, and so forth.
Ideas:
- Prioritize spare creation depending on the scenario it is needed for (e.g. based on frame depth)
- Cool-down timer (seems like an undesirable source of potential test flakiness)
- Don't immediately tear down spare-for-profile-A if
- Less than X recently taken spares belonged to profile A (i.e. we have recently switched the spare to profile A)
- The tear down and switch to profile B wasn't consistently needed in the last Y cases (e.g. we won't switch to B if the spare is needed for B,C,B,C,...).
Comment 1 by lukasza@chromium.org
, May 30 2018