Here's a profile where I followed the STR here and then clicked "List All Tabs" twice resulting in two large jank areas: https://share.firefox.dev/4jwMwsA (Some of the jank time is spent in sessionstore which is bug 1849393; I've done "drop samples with this function" for sessionstore writes, to avoid those sample muddying up the time that we're considering here; and then I further did "focus on function" for `XULPopupElement.openPopup` to only focus on the time in there). This time is essentially all reported as an ~8-second style flush, which is almost entirely spent in `nsImageFrame::UpdateXULImage`, which itself is ~70% spent in `NS_NewURI` and ~30% spent in `nsContentUtils::LoadImage`. All of that work seems to be stuff that's proportional-to-the-length-of-the-URI, and the most direct way to avoid repeating that work would be for the tab-strip to be using shorter URIs here (e.g. blob URIs) for the favicons, if that's possible...
Bug 1944111 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Here's a profile where I followed the STR here and then clicked "List All Tabs" twice resulting in two large jank areas: https://share.firefox.dev/4jwMwsA (Some of the jank time is spent in sessionstore which is bug 1849393; I've done "drop samples with this function" for sessionstore writes, to avoid those sample muddying up the time that we're considering here; and then I further did "focus on function" for `XULPopupElement.openPopup` to only focus on the time in there). This time is essentially all reported as an ~8-second style flush, which is almost entirely spent in `nsImageFrame::UpdateXULImage`, which itself is ~70% spent in `NS_NewURI` and ~30% spent in `nsContentUtils::LoadImage`. All of that work seems to be stuff that's proportional-to-the-length-of-the-URI, which is why it's so heavyweight here when we're dealing with extremely long data URIs for files on the order of hundreds of kilobytes. Probably the most direct way to avoid repeating that work would be for the tab-strip to be using shorter URIs here (e.g. blob URIs) for the favicons, if that's possible...