Decouple test reporter IO from test execution#3962
Merged
alexcrocha merged 1 commit intomainfrom Feb 19, 2026
Merged
Conversation
Contributor
Author
How to use the Graphite Merge QueueAdd the label graphite-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
vinistock
reviewed
Feb 18, 2026
To reduce test reporter overhead on large test suites, we can buffer socket writes so the test thread never blocks on IO
cac8b96 to
4ed1af0
Compare
vinistock
approved these changes
Feb 19, 2026
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.

Motivation
This PR solves the
LspReporter's IO bottleneck (as identified in #3843) by decoupling socket writes from test execution. When the reporter is active, every test result blocks the test thread until the OS completes a socket write. For suites with many fast tests, this IO overhead becomes the bottleneck and can degrade test runtime.Implementation
send_messagenow pushes to aThread::Queueinstead of writing to the socket directly. A background writer thread pops messages from the queue and writes them to the socket, so the test thread never blocks on IO.Shutdown uses
Queue#closeto signal the writer thread that no more messages will be enqueued, allowing it to exit after processing the remaining ones.Automated Tests
The existing tests should continue to pass with this change as the external behaviour remains the same.