简体   繁体   中英

Data synchronization in offline App

I'm deploying an app with Cordova ( phoneGap) and I Need to have my data on my App even when it is offline. I Found PouchDB, but this is the only Solution ? I Already use CouchDB and PouchDb, But I didn't like the performance ( with not big Database) This database contains 500000 documents with images

If you need an open-source JavaScript synchronization solution, PouchDB is probably the fastest thing out there, yeah. If you're experiencing poor performance, there are a few possibilities:

  1. use bulkDocs() instead of multiple put() or post()s
  2. insert Blobs directly instead of base64 images (see the attachments guide for more info).
  3. WebSQL has sliiightly better performance than IndexedDB in Chrome/Android, for certain tasks (although it's slower for binary data). The SQLite Plugin is the worst in terms of performance; don't use it. See the adapters guide for more detail.

Otherwise, you might have to dip into native solutions like Couchbase Mobile or Firebase.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM