Closed Bug 1600244 Opened 6 years ago Closed 6 years ago

Don't store favicons added after FaviconLoader::onPageShow

Categories

(Toolkit :: Places, task, P2)

task
Points:
2

Tracking

()

RESOLVED FIXED
mozilla73
Iteration:
73.1 - Dec 2 - Dec 15
Tracking Status
firefox-esr68 --- wontfix
firefox71 --- wontfix
firefox72 --- fixed
firefox73 --- fixed

People

(Reporter: mak, Assigned: mak)

References

Details

Attachments

(1 file)

We should store any favicons that are set initially on the page, but then we should stop storing them, icons set through javascript by modifying <link> tags are good for tabs, not for permanent storage.
There is one problem though, a few tests depend on this behavior.
Alternatively, we could decide to stop storing icons after a certain time threshold.

The scope is to avoid storing icons modified just to show a badge.

Ok, I think we can use the onPageShow() handler of the FaviconLoader the threshold, from that point on any added icon should not be stored, while any icons added before were in the <head>

Assignee: nobody → mak
Status: NEW → ASSIGNED
Iteration: --- → 73.1 - Dec 2 - Dec 15
Summary: Don't store favicons added after page load → Don't store favicons added after FaviconLoader::onPageShow

Icons added after the initial parsing are likely randomly generated to show badges,
thus they are not good for permanent storage, because they are transient and can
potentially flood the store.

Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/0d24232377d9 Don't store favicons added after the initial page load. r=mossop
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Comment on attachment 9112607 [details]
Bug 1600244 - Don't store favicons added after the initial page load. r=Mossop

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: The result of storing many of these icons is that in certain cases (like the one in Bug 1598371) the database becomes so large that Firefox performance is affected (temporary freezes) due to I/O.
  • User impact if declined: Browser may visibly freeze a moment on page loads for heavy users of websites using badged favicons
  • Fix Landed on Version:
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): The biggest risk is that we may stop storing favicons for some sites, if they use js tricks to set their favicons.
  • String or UUID changes made by this patch:

Beta/Release Uplift Approval Request

  • User impact if declined: Browser may visibly freeze a moment on page loads for heavy users of websites using badged favicons.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: The automated test should be sufficient.
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): The biggest risk is that we may stop storing favicons for some sites, if they use js tricks to set their favicons.
  • String changes made/needed:
Attachment #9112607 - Flags: approval-mozilla-esr68?
Attachment #9112607 - Flags: approval-mozilla-beta?
Depends on: 1600242

Do we think or have evidence that this is common enough to warrant jumping the trains?

We have a report from Yandex that this is surely a problem for everyone using yandex mail (see bug 1598371), other mail systems may have similar problems. I don't have statistics though, mostly guessing based on the kind of problem.

Comment on attachment 9112607 [details]
Bug 1600244 - Don't store favicons added after the initial page load. r=Mossop

favicons fix, approved for 72.0b5. I think this needs to go after bug 1600242.

Attachment #9112607 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9112607 [details]
Bug 1600244 - Don't store favicons added after the initial page load. r=Mossop

Per bug 1600242.

Attachment #9112607 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68-
Regressions: 1621869
No longer regressions: 1621869
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: