mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-09 08:33:28 +02:00
We were going through path building, retargeting, capturing/bubbling phases etc. for each event that we were dispatching. We now optimize for the case where there are no listeners for the event type on the target node nor its ancestors by skipping all that work. This decimates methods that depend on event dispatching like `Document::set_hovered_node()` when there are no relevant listeners, which reduced its runtime by 99% (42.5ms -> 0.5ms) on my machine for sites like https://wordsalad.online/.
21 KiB
21 KiB