portals icon indicating copy to clipboard operation
portals copied to clipboard

State backend cache

Open jspenger opened this issue 1 year ago • 2 comments

We should add an in-memory cache to the RocksDB state backend, just to avoid serialization and deserialization costs for certain workloads. At least, we should add it and see if it affects the performance significantly.

For this I would suggest to use the caffeine library. More information will be posted in further comments below.

The tasks are the following:

  • Add a new Cache trait to the state backend.
  • Implement a factory for creating a Caffeine-based cache.
  • Integrate the new Cache into the RocksDB state backend.
  • Test the performance.

Notes:

  • Should be completed after all other tasks in #96 have been completed.

jspenger avatar Apr 21 '23 20:04 jspenger