Hello,
I’ve noticed some big performance issues when my add-on GroupSpeedDial is combined with some other add-ons like Adblock Plus, Ghostery and especially Flash Video Downloader.
Now since we are in WebExtension era, I would expect this is not really possible anymore.
What I found out, is that listener browser.webRequest.onBeforeRequest
registered in these add-ons will fire for each image displayed in my add-on page. These images are “data:image” encoded in base64 and the event object looks like this:
{
"requestId": "fakeRequest-2905",
"url": "data:image/png;base64,iVB...",
"originUrl": "moz-extension://f3eb16fa-df39-42f1-941f-f6d36b36ce12/dial.html",
"documentUrl": "moz-extension://f3eb16fa-df39-42f1-941f-f6d36b36ce12/dial.html",
"type": "video",
"timeStamp": 1536489946175,
"frameId": 6442451129,
"parentFrameId": -1,
"tabId": 9,
"tab": {
"id": 9,
"index": 6,
"windowId": 1,
"highlighted": true,
"active": true,
"attention": false,
"pinned": false,
"status": "complete",
"hidden": false,
"discarded": false,
"incognito": false,
"width": 1680,
"height": 1128,
"lastAccessed": 1536490035783,
"audible": false,
"mutedInfo": {
"muted": false
},
"isArticle": false,
"isInReaderMode": false,
"sharingState": {
"camera": false,
"microphone": false
},
"cookieStoreId": "firefox-default",
"url": "moz-extension://f3eb16fa-df39-42f1-941f-f6d36b36ce12/dial.html#2",
"title": "GroupSpeedDial",
"favIconUrl": "data:image/png;base64,iVB..."
},
"responseHeaders": null,
"contentType": null,
"size": null,
"tabUrl": "moz-extension://f3eb16fa-df39-42f1-941f-f6d36b36ce12/dial.html#2",
"tabTitle": "GroupSpeedDial",
"filename": null,
"ext": null,
"contentRange": null,
"contentDisp": null,
"headers": {},
"foundMedia": null
}
Is this correct behavior?
Should add-on be receiving this event from another add-on?
And mostly, why is this causing performance issues in my add-on? Sometimes it even shows the yellow bar saying that my add-on page is slowing down your browser (which is not true!).
Profiler info from Flash Video Downloader when switching betwen two groups with few dials: