(with gfx shared font) Stating browser by opening a emoji-filled HTML file does 4s of work on parent process, file process and sync IPC on webextension process
Categories
(Core :: Graphics: Text, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox124 | --- | fixed |
People
(Reporter: mayankleoboy1, Assigned: jfkthame)
References
Details
Attachments
(3 files)
This is more of an exploratory/curiousity bug.
STR:
- Download the attached html file to your local machine
- Close the browser completely
- Double click on the html file such that the browser will start with the html file
AR: Tons of work done on parent process, file process and sync IPC on webextension (ublock)
ER: Maybe something to improve?
Ignore the actual painting work in rendering the emojis.
Profiles captured by double-clicking on the file, and then starting the profiler when the UI is generated and the profiler icon is visible:
Opening the browser by clicking on html file : https://share.firefox.dev/3vEdquf / https://share.firefox.dev/47OmpXa
File opened after the browser has been open : https://share.firefox.dev/48JEEhK
| Reporter | ||
Comment 1•2 years ago
|
||
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 2•2 years ago
|
||
| Reporter | ||
Comment 3•2 years ago
|
||
Here are profiles where I do "startup profiling" by setting environment variables:
startup with html file: https://share.firefox.dev/3Soby1p
Normal startup: https://share.firefox.dev/3vMAYwK
| Reporter | ||
Comment 4•2 years ago
•
|
||
This appears to be related to the gfx shared font thingy.
Manually triggering profiler ASAP after opening the file:
no shared font: https://share.firefox.dev/3HsCCq7 / https://share.firefox.dev/3HrBoeQ
shared font: https://share.firefox.dev/47KrRKy / https://share.firefox.dev/429aXnq
With startup profiling:
no shared font: https://share.firefox.dev/3O783tR
shared font: https://share.firefox.dev/4289RbH
| Reporter | ||
Comment 5•2 years ago
|
||
I also dont know why there is such a big difference in profiles between manually starting profiling Vs "startup profiling"
| Reporter | ||
Updated•2 years ago
|
Comment 6•2 years ago
|
||
(In reply to Mayank Bansal from comment #4)
This appears to be related to the gfx shared font thingy.
Manually triggering profiler ASAP after opening the file:
no shared font: https://share.firefox.dev/3HsCCq7 / https://share.firefox.dev/3HrBoeQ
shared font: https://share.firefox.dev/47KrRKy / https://share.firefox.dev/429aXnq
The second shared font profile here has 332446 StartCmapLoading messages in it (https://share.firefox.dev/3Uciksu). That seems a bit much!
| Assignee | ||
Comment 7•2 years ago
|
||
Ugh, yeah - that's bad. I guess each time we hit one of the emoji characters and need to do font fallback, this happens because the charmaps have not yet been loaded. The loading process will have been started the first time it happens, but hasn't yet completed, and so font fallback keeps asking for it.
The parent process will basically discard the extra requests (unless they cover more of the font collection, but in this case it'll be the same every time), but we should try to avoid sending them at all because all that ipc traffic is hurting.
I'll look into what we can do to mitigate this.
| Assignee | ||
Comment 8•2 years ago
|
||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
| bugherder | ||
| Reporter | ||
Comment 11•2 years ago
|
||
A try build worked great (there was only 1 startcmap msg).
But i will do a better test.
| Reporter | ||
Comment 12•2 years ago
|
||
manual profiling: https://share.firefox.dev/3OiNGtO
startup profiling: https://share.firefox.dev/3SAlEME
Id say this is fixed.
| Assignee | ||
Comment 13•2 years ago
|
||
Thanks for reporting it, and for confirming the fix.
Description
•