Batched notifications #457
Labels
area: data
Things related to the data structures underlying the world, and the functions that manipulate them.
kind: performance
Ways to increase performance or efficiency without adding functionality
Right now, each individual change to a
Space
or other entity usinglisten::Notifier
immediately iterates through the set of listeners and invokes all of them. This is probably rather cache-unfriendly and also contains redundant operations.Try buffering notifications until the end of the overall operation (e.g. a transaction). Benchmark the results (e.g. modifying a
Space
with a listening raytracer). The buffer could be stored in the notifier itself, or it could be in a guard object which flushes the buffer on drop.On the
Listener
side, change the signature to accept a slice of messages.The text was updated successfully, but these errors were encountered: