Opened on 04/24/2018 at 07:27:12 PM

Closed on 06/15/2018 at 06:01:59 PM

Last modified on 08/21/2018 at 10:21:34 AM

#6621 closed change (fixed)

Use IndexedDB (directly) to store filter data on Microsoft Edge

Reported by: sebastian Assignee: geo
Priority: P3 Milestone: Adblock-Plus-3.3-for-Chrome-Opera-Firefox
Module: Platform Keywords:
Cc: oleksandr, kzar Blocked By: #6625, #6650, #6721
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by sebastian)


There is currently only one change left in the edge branch that hasn't been addressed in master yet. We initially hoped that Microsoft would address the performance of on their end so that we wouldn't need to rely on IndexedDB anymore by now. But since this didn't happen, we should prepare a more sustainable workaround, we can land in master (in order to get rid of the edge branch).

There are a couple issues with the current approach implemented in the edge branch, that prevent the change from being merged into master (as-is):

  • It patches lib/io.js, so that if we'd merge this change this would cause IndexedDB to be used everywhere, not only on Microsoft Edge. Instead we should add a separate implementation of the IO API that replaces lib/io.js in the builds for Microsoft Edge only.
  • It uses localForage, a third-party library that provides a redundant abstraction on top of IndexedDB (and other available storage backends). This was already criticized in the review back then, but we merely decided to stick with it as long as the change isn't merged into master.

What to change

  • Implement a drop-in replacement for lib/io.js that uses IndexedDB directly.
  • Integrate it with our build system, so that the current implementation of lib/io.js (using keeps being included in the Chrome and Firefox builds, while the new implementation (using IndexedDB) gets included in the builds for Microsoft Edge instead.
  • Migrate existing user's data that were stored in IndexedDB via localForage.

Attachments (0)

Change History (15)

comment:1 Changed on 04/24/2018 at 07:27:31 PM by sebastian

  • Summary changed from Use IndexedDB (directly) to store filter on Microsoft Edge to Use IndexedDB (directly) to store filter data on Microsoft Edge

comment:2 Changed on 04/24/2018 at 07:32:23 PM by sebastian

  • Description modified (diff)

comment:3 Changed on 04/24/2018 at 08:05:53 PM by geo

  • Owner set to geo

comment:4 Changed on 04/24/2018 at 08:25:23 PM by sebastian

  • Priority changed from Unknown to P3
  • Ready set

comment:5 Changed on 04/24/2018 at 08:40:05 PM by kzar

  • Cc sebastian kzar added

comment:6 Changed on 04/24/2018 at 08:40:29 PM by kzar

  • Cc sebastian removed

comment:7 Changed on 04/25/2018 at 01:11:59 PM by sebastian

  • Blocked By 6625 added

comment:8 Changed on 05/04/2018 at 06:33:18 PM by geo

Any suggestions on when to migrate the data?
1.When storage is first used?
2.When the extension starts?

comment:9 Changed on 05/04/2018 at 07:49:56 PM by sebastian

For reference, on IRC, I suggested to perform the data migration as soon as the code in the script/module is executed, and then have a promise that resolves once the migration is done, while deferring IO operations until that promise is resolved. However, if somebody comes up with a simpler approach that works, fine with me too.

comment:10 Changed on 05/05/2018 at 08:18:42 AM by tlucas

  • Blocked By 6650 added

comment:11 Changed on 06/01/2018 at 05:00:11 PM by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:12 Changed on 06/01/2018 at 06:02:23 PM by sebastian

  • Blocked By 6721 added

comment:13 Changed on 06/15/2018 at 06:01:25 PM by abpbot

comment:14 Changed on 06/15/2018 at 06:01:59 PM by sebastian

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

comment:15 Changed on 08/21/2018 at 10:21:34 AM by Ross

Is this in the current Edge development build? The Edge build below seems fine storage-wise, it's just difficult to tell if I'm testing the old storage or this one.

ABP Edge
Edge 42.17134.1.0

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from geo.
Note: See TracTickets for help on using tickets.