Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate if changing storage method is necessary #552

Open
Janaka-Steph opened this issue Aug 21, 2022 · 2 comments
Open

Investigate if changing storage method is necessary #552

Janaka-Steph opened this issue Aug 21, 2022 · 2 comments

Comments

@Janaka-Steph
Copy link
Collaborator

We are currently using Capacitor v3 @capacitor/storage (https://capacitorjs.com/docs/v3/apis/storage).
On Capacitor v4 it changed for this plugin https://capacitorjs.com/docs/apis/preferences.
But there are basically the same, using UserDefaults on iOS and SharedPreferences on Android.

Even though there is no size limit on iOS UserDefaults, the doc says: "This API is not meant to be used as a local database. If your app stores a lot of data, has high read/write load, or requires complex querying, we recommend taking a look at a SQLite-based solution."

We may gain some perf using https://github.com/capacitor-community/sqlite

@tiero
Copy link
Contributor

tiero commented Aug 22, 2022

What if we use use Ionic Storage with SQlite as "storage"? This way we retain the Key/Value interface we already use

https://github.com/ionic-team/ionic-storage#sqlite-installation

@Janaka-Steph
Copy link
Collaborator Author

Janaka-Steph commented Aug 22, 2022

Yes it is an option too. Would be this plugin https://github.com/storesafe/cordova-sqlite-storage
Last commit July 2021. We can give it a try.
But it is not compatible with Capacitor 4, may never be, and may be an issue later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants