Phase 2: RINIT fast-path & deferred hooks — 630% → 10% overhead#4
Merged
Phase 2: RINIT fast-path & deferred hooks — 630% → 10% overhead#4
Conversation
added 3 commits
March 6, 2026 12:45
Key changes: - Add observer_active/statement_handler_enabled globals for fast bailout - RINIT trigger pre-check: disable observer when no debug session possible - Defer ZEND_COMPILE_EXTENDED_STMT to only when debugger will connect - Remove zombie ZEND_ASSIGN* opcode handlers (leftover from stripped modules) - Gate xdebug_debugger_compile_file behind observer_active check - Set observer_active=1 in xdebug_mark_debug_connection_active for mid-request Benchmark (bench.php, loaded no client): - Before: ~10.8s (~630% overhead) - After: ~1.63s (~10% overhead) - Vanilla: ~1.48s Test results: 222 pass, 23 fail, 49 skip (vs Phase 1: 225/20/49) 3 accepted regressions: bug00622 (eval source mapping), bug01101 (xdebug_break jit mode), start_ignore_yes_env (env trigger edge case). Remaining 10% overhead is Observer API floor (engine-level).
pronskiy
added a commit
that referenced
this pull request
Mar 11, 2026
Phase 2: RINIT fast-path & deferred hooks — 630% → 10% overhead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key changes:
Benchmark (bench.php, loaded no client):
Test results: 222 pass, 23 fail, 49 skip (vs Phase 1: 225/20/49) 3 accepted regressions: bug00622 (eval source mapping), bug01101 (xdebug_break jit mode), start_ignore_yes_env (env trigger edge case). Remaining 10% overhead is Observer API floor (engine-level).