Closed Bug 1999884 Opened 9 months ago Closed 9 months ago

Experiment with slightly delaying the processing of the cached script

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

The navigation cache improves the browsertime loadtime score, but at the same time it regresses the visual score.

The visual score is dependent on the scheduling, especially between JS and CSS/image, and making the JS processing earlier and faster often result in regressing the visual score.

With the navigation cache, cached script immediately and synchronously become ready, which means JS will be processed earlier than other resources more often.
Then, the situation happens only on subsequent loads, where both CSS and images are also supposed to be cached in content process.
In that case, slightly delaying the processing of the cached script might give other resources to have time to process before JS,
which may help the visual score.

before: https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&revision=03fc3d079ebe63638d969ff14f92639d5318be07
after: https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&revision=a4299f5c27c8714d91aeb91b5ee3680197cc970a
0ms delay: https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&revision=bd332b1f091a8da6c7c35a95defc95aa714c266b&searchStr=ship%2Cbrowsertime%2Candroid
10ms delay: https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&searchStr=ship%2Cbrowsertime%2Candroid&revision=beb0a0f1b396fb7e1f092c76dfbf2869271e991b
50ms delay: https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&searchStr=ship%2Cbrowsertime%2Candroid&revision=4fd0a3f2bba62d75860397ae9eaa921460693485

So, with before vs after, the loadtime improves, but the visual score shows both regression and improvements.

0ms delay shows some improvements on the visual score, but shows regression on loadtime in some case.
10 and 50 also shows some improvements on the visual score, but the amount of the regression is larger.

So, at least a fixed unconditional delay is not something we want,
but this means there's better scheduling as long as we can reflect the all loaders' situation.
We should look into implementing a better scheduling algorithm for the all resources, rather than just adding a delay here.

Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → WONTFIX
See Also: → 2042605
You need to log in before you can comment on or make changes to this bug.