Convert the platform font loader thread to use the background thread pool instead
Categories
(Core :: Layout: Text and Fonts, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: KrisWright, Assigned: heycam)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Instead of making a static lazy idle thread [1], the work done here could be sent to the background IO thread pool [2] using the NS_DISPATCH_EVENT_MAY_BLOCK
flag.
[1] https://searchfox.org/mozilla-central/rev/4537228c0a18bc0ebba2eb7f5cbebb6ea9ab211c/gfx/thebes/gfxUserFontSet.cpp#926-927
[2] https://searchfox.org/mozilla-central/rev/4537228c0a18bc0ebba2eb7f5cbebb6ea9ab211c/xpcom/threads/nsThreadUtils.h#1737-1755
Assignee | ||
Comment 1•5 years ago
|
||
Hi Kris, the work that this thread does is running the OpenType sanitizer over the font data after it has already been fetched from the network. The call into platform library functions to create the font with the sanitized data is done back on the main thread afterwards. (And this isn't used for loading locally installed fonts off the disk.) Does this mean it shouldn't use NS_DISPATCH_EVENT_MAY_BLOCK
?
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #1)
Hi Kris, the work that this thread does is running the OpenType sanitizer over the font data after it has already been fetched from the network. The call into platform library functions to create the font with the sanitized data is done back on the main thread afterwards. (And this isn't used for loading locally installed fonts off the disk.) Does this mean it shouldn't use
NS_DISPATCH_EVENT_MAY_BLOCK
?
You're correct, I only looked briefly at it so if it's not doing anything blocking then it doesn't need to use the NS_DISPATCH_EVENT_MAY_BLOCK
flag.
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Comment 6•5 years ago
|
||
bugherder |
Description
•