mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Improve shared state cache contention (#9321)
This commit is contained in:
@@ -1643,7 +1643,7 @@ impl<Block: BlockT> Backend<Block> {
|
||||
self.changes_tries_storage.post_commit(changes_trie_cache_ops);
|
||||
|
||||
if let Some((enacted, retracted)) = cache_update {
|
||||
self.shared_cache.lock().sync(&enacted, &retracted);
|
||||
self.shared_cache.write().sync(&enacted, &retracted);
|
||||
}
|
||||
|
||||
for m in meta_updates {
|
||||
@@ -2052,7 +2052,7 @@ impl<Block: BlockT> sc_client_api::backend::Backend<Block> for Backend<Block> {
|
||||
);
|
||||
let database_cache = MemorySize::from_bytes(0);
|
||||
let state_cache = MemorySize::from_bytes(
|
||||
(*&self.shared_cache).lock().used_storage_cache_size(),
|
||||
(*&self.shared_cache).read().used_storage_cache_size(),
|
||||
);
|
||||
let state_db = self.storage.state_db.memory_info();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user