| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
thanks Sean! A few high level questions before I take a closer look (also since a lot of this CL looks boilerplate-y)
Currently, as outlined in the Bug, according to SSM, we are seeing
~0.4% of main thread CPU being consumed by a O(n^2) operation in
DispatchEventToListeners(). This is especially problematic because it
is on the critical path. This CL changes that function to be O(n log n).curious: can you share the actual time savings here before/after via profiling? (just something quick in the code that prints time should be fine)
using Set = std::map<EventListener::ID, std::unique_ptr<EventListener>>;Essentially we're using this map except everything is wrapped so we can have the Listener back-reference it, to check a listener is only in one map at a time (wrapper is basically to guarantee these via calls?)
is it possible to do something like `class Listeners : public std::map<EventListener::ID, std::unique_ptr<EventListener>>` ?
class ID {can we keep this as a struct since we're not adding any new data and the only new method added is public anyway?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |