Aggregate RAR search diagnostics in binary logs - #14599
Draft
baronfel wants to merge 2 commits into
Draft
Conversation
Replace per-candidate rejected assembly messages with one structured search trace per reference behind ChangeWave 18.11. Preserve legacy rendering while deduplicating trace components in binary logs and supporting node transport. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b1c8b059-4e8b-4aec-8862-36f474eb2061
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b1c8b059-4e8b-4aec-8862-36f474eb2061
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.
Context
ResolveAssemblyReference (RAR) currently writes one
BuildMessageEventArgsfor each rejected assembly candidate. Large builds can contain millions of these events.The analyzed 823.6 MiB binlog contained approximately 19.6 million RAR messages. This change covers 14.7 million messages with 4.45 billion rendered characters.
The projected compressed size is approximately 620 MiB, with a range of 600–650 MiB. This result is a reduction of approximately 175–225 MiB (21–27%).
The estimate includes the affected RAR messages and component-level string deduplication. It excludes RestoreTaskEx, Tsc, and RAR conflict-list output.
Implementation
AssemblyResolutionSearchTraceEventArgs.Compatibility
Ordinary loggers render one multiline message for each reference. The message contains the same candidate details as the individual messages.
Loggers add per-event timestamps, target names, task identifiers, and similar decorations once for each reference. Previously, loggers added these decorations to each candidate message.
MSBUILDDISABLEFEATURESFROMVERSION=18.11restores the individual candidate messages. Warning and error behavior does not change.Older forward-compatible readers skip the new length-prefixed event. These readers do not show the aggregated search trace.
Measured impact
The benchmark uses the actual lazy legacy event shape. It does not format legacy messages during capture or serialization.
The fixed event schema increases the first-event size at 2 and 32 attempts. The size crossover occurs between 32 and 116 attempts.
Capture allocation decreases by 49–62% in all measured cases. At 116 attempts, end-to-end time decreases by 11.5%.
Message rendering remains lazy. If a logger requests the full multiline message, the aggregate path allocates approximately twice as much as the legacy path.
Testing
./build.sh --test -c Release -v quiet -bl --binaryLogName 21.binlog --pipelinesLog./build.sh -v quiet -bl --binaryLogName 24.binlog --pipelinesLogDesign decision
The event does not divide one reference trace into chunks. A reference is the natural unit, and observed chatty references have hundreds of attempts.