Open Bug 1381425 Opened 8 years ago Updated 2 years ago

use HTTP OMT data delivery while loading CSS stylesheet

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox57 --- wontfix

People

(Reporter: schien, Unassigned)

References

Details

layout/style/Loader use nsUnicharStreamLoader to load entire stylesheet before parsing. In order to utilize HTTP off-main-thread data delivery, we might be able to make nsUnicharStreamLoader to redirect ODA to stream transport thread pool. https://searchfox.org/mozilla-central/rev/01d27fdd3946f7210da91b18fcccca01d7324fe2/layout/style/Loader.cpp#1720
Priority: -- → P3
To be noticed that Stylo uses https://searchfox.org/mozilla-central/source/layout/style/StreamLoader.cpp to load the stylesheet. We'll need to make it OMT ODA capable as well.
Severity: normal → S3
Performance Impact: --- → ?

:jesup, could you elaborate on why the performance impact was set to ? ? Is there a blocker bug that could provide more context?

Flags: needinfo?(rjesup)

This should move CSS loading Off MainThread, which should help pageload and/or responsiveness during pageload.

Flags: needinfo?(rjesup)

It is very much unclear how much this affects page load.
Depending on the guess the calculator gives estimate "performance impact none" or "performance impact high".
We do already speculative loading and then omt parsing, so adding omt loading might or might not be significant. Of course the loading itself is happening in another process, this would be just how the data is consumed in a content process.
And since OnStopRequest needs to happen on the main thread, we still need to hop into that thread before doing omt parsing.
This might become more effective once OnStopRequest can happen omt.

I think we should do some more investigation here, and then re-evaluate the impact.
jesup, could you perhaps provide some profiles which hint at least a bit how much this could improve page load?
Or ask if denis or emilio have any guesses?

Flags: needinfo?(rjesup)

Linking this to the OMT project

Flags: needinfo?(rjesup)

Let's unset the performance impact flag for now until we have better evidence.

Performance Impact: ? → ---
You need to log in before you can comment on or make changes to this bug.