Faster processor through block level object cache

Open
#205 9 comments 0 reactions 1 assignee View on GitHub

@metmirr is already working on this.

Since Feb 8, 2021.

Assessment

This issue has not been assessed yet.

Description

enhancement low-prio

Background

Currently, we are doing a transaction for every single write operation in every single mapping. This is very slow.

Possible solution

Investigate how to make processor write once, with one transaction, per block.

@dzhelezov Suggested this could be done by introducing an intermediate cache for all the write/read operations done from the mappings via the database manager interface. So the implementation would have a pool of dirty objects, and whenever a mapping wants to read from the database, the manager gives a dirty version back if it exists. Likewise, when writing, this involves writing only to this pool of dirty objects, possibly overwriting an existing older version of the same object.

Dominant language
TypeScript
Stars
50
Forks
43
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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.

More from Joystream/hydra

All issues in Joystream/hydra

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.