Skip to content

jeep-sqlite alternative #583

Duplicate
Duplicate

Description

@mustafa0x

First, I want to thank the maintainer for the huge effort they've put into this incredibly valuable plugin.

Second, I want to ask: for web, is there an alternative to jeep-sqlite? I've noticed two issues with it:

  1. Very large size. It adds 500kb to my javascript bundle (excluding the wasm file). More than the rest of my app, combined.
  2. It requires calling saveToStore after any changes. This creates an easy pitfall: the developer makes changes create/update/delete but forgets to call saveToStore.

I suggest something like rhashimoto's IDBBatchAtomicVFS.

Activity

  1. oliveryasuna commented on Sep 22, 2024

    @oliveryasuna

    Theoretically, you could proxy the web implementation and use whatever you want.

  2. jepiqueau commented on Sep 22, 2024

    @jepiqueau
    Collaborator

    @mustafa0x

    • regarding the saveToSore comment, i would like to say in earlier version the saveToStore was done for any new INSERT, UPDATE or DELETE sql commands. it has been removed as when developers where loading large batch of data it was taking too long to execute the process. A property has been added to the Stencil component autosave with default to false. Set this property to true when you set the jeep-sqlite component in your app, it will allow you to not care about the saveToStore and then fix the easy pitfall.
    • regarding the large size comment it is mainly due to the size of the sql-wasm.wasm which is intrinsec to sql.js. The only way to limit the size will be to move away from sql.js which means rewriting the stencil component.

    Hope this clarify.

  3. mustafa0x commented on Sep 22, 2024

    @mustafa0x
    Author

    Thanks you so much @jepiqueau, I'm very grateful for the tremendous effort you've put into this very-useful plugin!

    the large size is mainly due to the size of the sql-wasm.wasm

    The jeep-sqlite stencil component alone is >500kb (the sql-wasm is 640kb.)

    https://unpkg.com/browse/jeep-sqlite@2.8.0/dist/esm/

    image
  4. jepiqueau commented on Sep 22, 2024

    @jepiqueau
    Collaborator

    @mustafa0x see also my answer to issue#579

  5. robingenz commented on Nov 25, 2026

    @robingenz
    Member

    Closing this as a duplicate of #693, which holds a concrete proposal for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions