mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
perf: Move mutex to the partition level (#5486)
This change introduces two key optimizations: * Mutex scope reduction: Limits the lock to individual partitions within `TaggedCache`, reducing contention. * Decoupling: Removes the tight coupling between `LedgerHistory` and `TaggedCache`, improving modularity and testability. Lock contention analysis based on eBPF showed significant improvements as a result of this change.
This commit is contained in:
committed by
GitHub
parent
991891625a
commit
94decc753b
@@ -277,6 +277,12 @@ public:
|
||||
return map_;
|
||||
}
|
||||
|
||||
partition_map_type const&
|
||||
map() const
|
||||
{
|
||||
return map_;
|
||||
}
|
||||
|
||||
iterator
|
||||
begin()
|
||||
{
|
||||
@@ -321,6 +327,12 @@ public:
|
||||
return cend();
|
||||
}
|
||||
|
||||
std::size_t
|
||||
partition_index(key_type const& key) const
|
||||
{
|
||||
return partitioner(key);
|
||||
}
|
||||
|
||||
private:
|
||||
template <class T>
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user