apache / apache/pouchdb

indexeddb: move attachments out of DOC_STORE?

Open
#8,811 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.6k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Pouch docs:

> What’s the point of attachments? If you’re dealing with large binary data (such as PNGs), you may incur a performance or storage penalty if you naïvely include them as base64- or hex-encoded strings inside your documents. But if you insert the binary data as an attachment, then PouchDB will attempt to store it in [the most efficient way possible](http://pouchdb.com/faq.html#data_types).

`pouchdb-adapter-indexeddb`'s current implementation currently follows the naïve path.

Moving attachments e.g. to a separate `IDBObjectStore` would have performance implications, and would require a migration.

If making this change, care should be taken to re-use IndexedDB transactions where possible.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.