solana icon indicating copy to clipboard operation
solana copied to clipboard

root_bank_cache

Open apfitzge opened this issue 1 year ago • 0 comments

Problem

Locking is bad for performance. If the root bank hasn't changed we do not need to lock again.

Summary of Changes

  • root_slot on BankForks is now an atomic
  • BankForks can return a read-only wrapper of root_slot
  • added a caching root bank that only locks the bank forks if the root bank has changed

Fixes #

apfitzge avatar Sep 22 '22 15:09 apfitzge