1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 07:22:43 +01:00

Reduce false sharing between pathInfoCache and Store

`perf c2c` shows a lot of cacheline conflicts between purely read-only
Store methods (like `parseStorePath()`) and the Sync classes. So
allocate pathInfoCache separately to avoid that.
This commit is contained in:
Eelco Dolstra 2025-09-04 11:54:59 +02:00
parent 5ae1b5f88b
commit a73cf447ac
7 changed files with 37 additions and 63 deletions

View file

@ -18,6 +18,9 @@ private:
std::shared_ptr<T> p;
public:
using element_type = T;
explicit ref(const std::shared_ptr<T> & p)
: p(p)
{

View file

@ -36,6 +36,8 @@ private:
public:
using element_type = T;
SyncBase() {}
SyncBase(const T & data)