Details
-
Task
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
None
-
Serverless
-
Server Serverless 2022-01-10
Description
When an operation occurs, the code go through all the OpObserver and invokes them so they can apply some added logic if needed.
As multiple OpObservers simply check if the collection is equal to a constant value. Creating a type of observer that's bound to a specific collection would allow usage of a map instead of iterating through all observers.
A new mechanism to bind such an observer could be something similar to :
void addObserver(std::string CollectionNamespace, std::unique_ptr<OpObserver> observer) |
This would allow usage of a map to avoid iterating though all the observers.