close
Skip to content

parallelize Descriptions setup, fix response leak, use typed stream keys - #3044

Merged
Vincent Biret (baywet) merged 2 commits into
microsoft:mainfrom
Imadnajam:main
Aug 20, 2026
Merged

parallelize Descriptions setup, fix response leak, use typed stream keys#3044
Vincent Biret (baywet) merged 2 commits into
microsoft:mainfrom
Imadnajam:main

Conversation

@Imadnajam

Copy link
Copy Markdown
Contributor
  • Dispose HttpResponseMessage in LoadFromUrlAsync (was leaking on every download)
  • Run assembly reads and GHES downloads concurrently in GlobalSetup via Task.WhenAll;
    aggregate into _streams afterward to avoid concurrent Dictionary writes
  • Replace string-keyed _streams with a private DescriptionSource enum for
    compile-time-checked, pre-sized lookups
  • Drop the async/await wrapper on each [Benchmark] method so MemoryDiagnoser
    measures ParseDocumentAsync, not an extra state machine
  • Derive the four pinned GHES URLs from one commit SHA constant
  • Add an HttpClient timeout; simplify Assembly access; align field naming
    Descriptions

- Dispose HttpResponseMessage in LoadFromUrlAsync (was leaking on every download)
- Run the assembly reads and GHES downloads concurrently in GlobalSetup via
  Task.WhenAll instead of sequential awaits; aggregate into _streams afterward
  to avoid concurrent Dictionary writes
- Replace string-keyed _streams (mixed file names / URLs) with a private
  DescriptionSource enum for compile-time-checked, pre-sized lookups
- Drop the redundant async/await wrapper on each [Benchmark] method so the
  MemoryDiagnoser numbers reflect ParseDocumentAsync, not an extra state machine
- Derive the four pinned GHES description URLs from one commit SHA constant
  instead of duplicating it across four literals
- Add an HttpClient timeout; modernize Assembly access; align field naming
@Imadnajam
Imad (Imadnajam) requested a review from a team as a code owner August 20, 2026 08:59

@baywet Vincent Biret (baywet) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@baywet
Vincent Biret (baywet) enabled auto-merge (squash) August 20, 2026 13:16
@baywet
Vincent Biret (baywet) merged commit 9c34bf1 into microsoft:main Aug 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants