share / share/sharedb

Question: why read/write snapshot from/to db on every commit?

Open
#521 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.5k
Forks
456
Avg merge
1d 5h
Merged PRs (30d)
5

Description

I have been browsing through the source code when trying to debug some performance issues, and found that on each commit the backend receives, it reads/writes a snapshot from backend.db, which could take some seconds when snapshot is a large object with many keys.
Why is this latest snapshot not stored in memory?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the commit path that reads and writes snapshots in backend.db, using the performance concern and snapshot size described in the issue as the starting point. Done means explaining why snapshots are persisted on every commit and determining whether an in-memory alternative is viable without changing the backend's correctness or durability.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, database
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.