-
-
Notifications
You must be signed in to change notification settings - Fork 108
perf: make TUnitMessageBus sync and fix array allocation
#4360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SummaryPerformance optimization that caches the DataTypesProduced array and wraps PublishAsync calls in ValueTask to avoid async state machine overhead. Critical IssuesNone found ✅ SuggestionsConsider consistency in early return patterns: Verify PublishAsync return type: DataTypesProduced caching is a clear win: Previous Review StatusUnable to retrieve previous comments due to GitHub token scope limitations. Verdict✅ APPROVE - No critical issues. The changes are well-motivated performance improvements that align with TUnit's "Performance First" principle. The 15MB savings on TUnit.ExampleProject demonstrates meaningful impact. |
asyncmethods return theTaskDataTypesProducedwould create a new array each time it was calledIDataProducerAgain returning
ValueTaskhere makes the callers state machine larger. I don't think non-genericValueTaskare useful hereBefore
After