Closed Bug 1506084 Opened 6 years ago Closed 6 years ago

Mark font loads with ClassOfService |= TailForbidden

Categories

(Core :: Layout: Text and Fonts, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: mayhemer, Assigned: jfkthame)

References

Details

Attachments

(1 file, 1 obsolete file)

Because of bug 1501461 we now consider fonts as trackers.  Trackers are tailed.  If fonts are tailed, it may cause visible font fetch/rendering delays.  Fonts should then be explicitly excluded from tailing [1].

Note that I was also experimenting in the past with marking font loads as Unblocked (forbids Tailing too) in bug 1349177, no conclusion made, no tools to measure actual impact.

[1] https://searchfox.org/mozilla-central/rev/17f55aee76b7c4610a974cffd3453454e0c8de7b/netwerk/base/nsIClassOfService.idl#56
Honza, any chance you could find someone from the Necko team to help fix this please?  Thanks!
Flags: needinfo?(honzab.moz)
You mean someone from the font team, no?  I can provide an example, but I would have to look after all the places where font loads are started.  That's more suitable for someone who knows that code than anyone from necko.

An example:
https://searchfox.org/mozilla-central/rev/647b9eb1099e373e079e16f147f74f3d1d65eed3/dom/script/ScriptLoader.cpp#1128-1129,1143
Flags: needinfo?(honzab.moz) → needinfo?(jfkthame)
Offhand, I think font loads are all started via FontFaceSet::StartLoad.[1] I don't see anything related to ClassOfService there at the moment, but it should be trivial to add.

[1] https://searchfox.org/mozilla-central/rev/647b9eb1099e373e079e16f147f74f3d1d65eed3/layout/style/FontFaceSet.cpp#613
Flags: needinfo?(jfkthame)
It just wants something like this, I guess?
Attachment #9025718 - Flags: review?(honzab.moz)
Hmm, to actually compile it needs an #include added. Updated patch.
Attachment #9025727 - Flags: review?(honzab.moz)
Attachment #9025718 - Attachment is obsolete: true
Attachment #9025718 - Flags: review?(honzab.moz)
Comment on attachment 9025727 [details] [diff] [review]
Set TailForbidden on class of service for webfont loads

Review of attachment 9025727 [details] [diff] [review]:
-----------------------------------------------------------------

Yes!  Thanks.
Attachment #9025727 - Flags: review?(honzab.moz) → review+
Priority: -- → P3
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/43db9886e19f
Set TailForbidden on class of service for webfont loads. r=mayhemer
https://hg.mozilla.org/mozilla-central/rev/43db9886e19f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Assignee: nobody → jfkthame
Thank you both!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: