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

feat: blockstore-opfs #314

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: blockstore-opfs #314

wants to merge 1 commit into from

Conversation

tabcat
Copy link
Contributor

@tabcat tabcat commented Jul 26, 2024

INCOMPLETE

Adds blockstore-opfs package to js-stores

The Origin Private Filesystem is a modern browser storage api representing a filesystem. This PR adds a new implementation of a blockstore using OPFS as the backend.

I've done some benchmarking and it seems indexeddb blockstore is still much faster for reads and writes to at least 256kb chunks. Benchmarks are here: https://github.com/tabcat/js-stores/tree/benchmark-opfs in the blockstore-opfs package.

I don't see a point in continuing this as indexeddb is better supported and faster (only benched chromium). There may be use for OPFS as a storage backend in js-IPFS land if blake3 makes chunking unnecessary, however blockstore may not be the best interface at that point.

@tabcat tabcat force-pushed the blockstore-opfs branch 3 times, most recently from 03b6620 to 9834731 Compare July 26, 2024 13:39
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

Successfully merging this pull request may close these issues.

1 participant