capacitor-community / sqlite

⚡Capacitor plugin for native & electron SQLite databases.
MIT License
507 stars 122 forks source link

jeep-sqlite alternative #583

Open mustafa0x opened 3 months ago

mustafa0x commented 3 months ago

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.

oliveryasuna commented 2 months ago

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

jepiqueau commented 2 months ago

@mustafa0x

Hope this clarify.

mustafa0x commented 2 months ago

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
jepiqueau commented 2 months ago

@mustafa0x see also my answer to issue#579