Skip to content

perf(event-bus): cache event propagation check#2157

Merged
innocenzi merged 1 commit into
tempestphp:3.xfrom
xHeaven:fix/event-bus-reflect-once
Jun 5, 2026
Merged

perf(event-bus): cache event propagation check#2157
innocenzi merged 1 commit into
tempestphp:3.xfrom
xHeaven:fix/event-bus-reflect-once

Conversation

@xHeaven
Copy link
Copy Markdown
Member

@xHeaven xHeaven commented Jun 5, 2026

GenericEventBus checked whether the event class had #[StopsPropagation] inside the loop for every handler. So if one event had 50 handlers, it rebuilt reflection for the same unchanged event 50 times.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Benchmark Results

Comparison of fix/event-bus-reflect-once against 3.x (c699ab834d421d13f092554fe749e3599d3ad026).

Open to see the benchmark results
Benchmark Set Mem. Peak Time Variability
QueryExecutionBench(benchExecuteInsert) - 4.350mb +0.01% 10.129μs +7.49% ±1.18% -4.71%

Generated by phpbench against commit 83874b6

@innocenzi innocenzi merged commit a6dc8a1 into tempestphp:3.x Jun 5, 2026
76 checks passed
@xHeaven xHeaven deleted the fix/event-bus-reflect-once branch June 5, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants