mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-02-04 22:30:28 +01:00
Since all the current hooks are defined specifically for a particular event type, we can register the hooks in a hash table using the event type as key for faster event hook collection. Also, hooks that are not specific to a particular event type, like constraints such as 'event.type=*', will be registered in both the undefined hook list, and also in all the hash table defined hook lists so they are always evaluated. Even though 'wp_event_dispatcher_new_hooks_iterator()' can still be used, it is now marked as deprecated because it is slower. The event hook collection uses 'wp_event_dispatcher_new_hooks_for_event_type_iterator()' now because it is much faster. Previously, the more hooks we were registering, the slower WirePlumber would process events as all hooks needed to be evaluated for all events constantly. This is not the case anymore with this patch. We can register thousands of hooks, and if only 1 of those runs for a particular event, only 1 will be evaluated instead of all of them. See #824 |
||
|---|---|---|
| .. | ||
| wp | ||
| meson.build | ||