mafintosh / mafintosh/hyperlog

locks

Open
#2 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
469
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Why does hyperlog lock itself so much? I'm really concerned about the performance of `add`, https://github.com/mafintosh/hyperlog/blob/master/index.js#L100. I fear that it would cripple performance on write.

Is that due to the `dag.changes` property?

Also there is a log on `replicate`. https://github.com/mafintosh/hyperlog/blob/db470807d8cb9c5eb19299b9e122b753fba11348/lib/replicate.js#L192-L199

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 reading index.js around line 100 and lib/replicate.js lines 192-199, then trace the dag.changes property and the logging mentioned for replicate. Measure or inspect how these affect add during writes; done means determining whether the locking and logging cause a performance problem and documenting the finding.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
distributed-systems, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.