profiler
profiler copied to clipboard
Put infrastructure in place so that we don't need to request favicons when loading a profile
Currently we load favicons by computing the favicon URL from the library URL. The consequences is 1/ that the favicon is the library domain's favicon, not the tab's favicon, and 2/ that we request the favicon when the user loads a profile.
Different ways to do this:
- stop displaying icons altogether
- replace the favicons by an icon showing where the frame comes from (eg: gecko / web content / js / native)
- fetch the favicons from the addon and put them in the profile
- fetch the tab's icons from the addon and put them in the profile
┆Issue is synchronized with this Jira Task
cc @arroway
Here is a profile exhibiting some favicons: http://bit.ly/2THV3f0
@julienw could you provide some context here? I'm not sure why we want to change the behavior here.
@gregtatum
As a reminder, currently we compute the favicon's URL by using the library URL's domain and adding favicon.ico. Then we load this icon. This has several drawbacks:
- the most important IMO is that we do a request to the website itself. I believe this is a privacy issue, because anybody who loads a profile will basically ping all library websites. Here is an example when loading a profile capturing the CNN load:

- another issue is that we get the favicon for the library's domain, not for the tab that was running the content. But maybe that's what we want?
- lastly not all domains use
favicon.icofor their favicons -- a good example is the gecko profiler itself: our favicon is defined in a tag in our index.html
That's why I think we should capture them at capture time and put them as data url in the profile data.
Ah makes sense, so we'll need a Gecko patch?
Ah yeah, for sure!
When we'll integrate the addon in Firefox, we can hook into https://searchfox.org/mozilla-central/source/browser/modules/FaviconLoader.jsm#497.