Speed up looking up actions by attachment point.
Review Request #14639 — Created Oct. 16, 2025 and updated — Latest diff uploaded
When populating the UI, we fetch actions based on various attachment
points. When we do this, the registry has to iterate through every
action every time, returning each one matching the attachment point.
This is algorithmically slow, and only gets worse as we expand usage of
actions.Now, when registering an action, the action gets placed in a cache of
attachment points to actions. Unregistering will remove that action from
the cache. This makes lookup very fast.There's also a bit of future-proofing thrown in for upcoming support for
actions that attach to multiple attachment points (part of a larger set
of work for enhanced actions in Review Board 7.1).
Unit tests pass.
Tested various parts of the UI, making sure the right actions are in
the right places.