Test Details Overview

Notify observers without copying them (#5188)

Every notification copied the whole list of observers under a lock, which costs an allocation and
a copy of each `std::function`. The list is now immutable and replaced as a whole when an observer
is added, so a notification only takes a reference to it through `boost::atomic_shared_ptr`.

Overlapping notifications therefore share one callable instead of each calling its own copy, which
the class states as part of the observer contract.

The remaining mutex only serializes the rare list updates, so it is no longer registered with the
timed lock tracking.

__________

Type: commit

Hash: a26c8e09d9daac18a4ec0102184316190c298e1a

Created: today

__________

gr0v1ty/nano-node:a26c8e09d9daac18a4ec0102184316190c298e1a

Test Results

Test Case Status Duration Median Deviation Log Graph