Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Use IndexedDB instead of WebStorage #16551

Closed

Description

@KOLANICH

Type: code issue

WebStorage uses text files with serialized JSON. It has multiple issues.

  1. The file is completely rewritten on any modification. This causes flash burning out on devices using flash memory-based SSD.
  2. json escapes special characters, which is inefficient.
  3. You have to serialize binary data into base64 which is damn inefficient.

The better approach is to use IndexedDB which allows storage of binary data and also has DB capabilities, which can be used for incremental updates.

I guess some compression support is also needed, maybe some modification to FF allowing to use compressed SQLite files.

Activity

  1. Bisaloo commented on Feb 16, 2019

    @Bisaloo
    Collaborator

    From what I understand, this change will be automatic with FF 56. Is that correct?

    https://blog.mozilla.org/addons/2019/02/15/extensions-in-firefox-66/

  2. KOLANICH commented on Feb 16, 2019

    @KOLANICH
    ContributorAuthor

    I don't think so. DB is more than just a key-value storage. Though it may solve some issues, to make the stuff work better, one should make use of DB features like transactions.

  3. cschanaj commented on Mar 30, 2019

    @cschanaj
    Collaborator

    From what I understand, this change will be automatic with FF 56. Is that correct?

    https://blog.mozilla.org/addons/2019/02/15/extensions-in-firefox-66/

    My understanding is that the change should be automatic from FF 66, but storage waste with JSON escape and base64 encoding will remain to be solve on the extension side.

  4. self-assigned this
    on Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions