Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#5769 closed defect (fixed)

Bad performance on Firefox, ad counter causes frequent storage updates

Reported by: trev Assignee: trev
Priority: Unknown Milestone: Adblock-Plus-3.0-for-Firefox
Module: Platform Keywords:
Cc: kzar, sebastian, mapx Blocked By:
Blocking: Platform: Firefox
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

Firefox 55, Adblock Plus 2.99.0.1838beta

How to reproduce

  1. Go to http://bildblog.de/

Observed behaviour

Multiple severe hangs while the page is loading.

Expected behaviour

No hangs.

Background

This is caused by storage.local being very inefficient in Firefox 55 (Firefox 57 is a lot better). We are causing storage to be saved frequently by updating the ads counter, on Firefox the entire file has to be rewritten for that - meaning all of filters as well.

What to change

Make sure that the ads counter is saved at most once per minute on Firefox.

Change History (6)

comment:1 Changed 21 months ago by abpbot

A commit referencing this issue has landed:
Issue 5769 - Worked around bad Firefox 55 storage performance

comment:2 Changed 21 months ago by trev

  • Milestone set to Adblock-Plus-for-Chrome-Opera-next
  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 21 months ago by mapx

Are you still using storage.local ?

"Kris Maglione
If you want resource efficiency, use IndexedDB. storage.local is not designed for storing huge amounts of data."

https://bugzilla.mozilla.org/show_bug.cgi?id=1371255#c11

comment:4 Changed 21 months ago by mapx

  • Cc mapx added

comment:5 Changed 21 months ago by trev

If you follow that discussion a bit further, IndexedDB doesn't really solve the issues. Switching to IndexedDB at this point would be a major effort again and absolutely not worth it.

comment:6 Changed 21 months ago by sebastian

I cannot judge (at the moment) whether migrating to IndexedDB is worth it on Firefox, and we seem to still have larger fires to fight when it comes to Firefox/WebExt support. However, on Microsoft Edge we already use IndexedDB and might have keep doing so for the foreseeable future. So if there are any advantages of using IndexedDB on Firefox, I would love to see Adblock Plus for Microsoft Edge and Firefox sharing the same storage implementation, at some point.

Note: See TracTickets for help on using tickets.