perf: defer Queue creation in DedicatedThreadExecutor#4508
Merged
thomhurst merged 1 commit intothomhurst:mainfrom Jan 19, 2026
Merged
perf: defer Queue creation in DedicatedThreadExecutor#4508thomhurst merged 1 commit intothomhurst:mainfrom
Queue creation in DedicatedThreadExecutor#4508thomhurst merged 1 commit intothomhurst:mainfrom
Conversation
Owner
SummaryDefers Queue allocation in DedicatedThreadSynchronizationContext to reduce memory allocations when the work queue is never used. Critical IssuesNone found ✅ SuggestionsNone - this is a solid performance optimization that aligns with TUnit's "Performance First" principle. The lazy initialization pattern is correctly implemented with proper null checks and thread-safe initialization under the existing lock. Verdict✅ APPROVE - No critical issues The change demonstrates:
|
7e6394a to
06a4130
Compare
Contributor
Author
|
Is the modular pipelines check broken? #4508 is also failing because of a weak refernce check failiure in NET framework |
Owner
I think it's a flaky test that I need to look into |
This was referenced Jan 19, 2026
This was referenced Feb 25, 2026
This was referenced Mar 4, 2026
This was referenced Mar 13, 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.
Defer initialisation of
QueueinDedicatedThreadExecutorI tried this with
List<Task> _taskQueueand didn't see an improvement, presumably it will always contain at least one object so deferring is useless.Before
After