Skip to content

Remove unused assembly symbol access #50389

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chsienki
Copy link

@chsienki chsienki commented Jun 3, 2025

Removes an unneeded assembly symbol access in the generator, which has a performance penalty.

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 20:27
@chsienki chsienki requested a review from a team as a code owner June 3, 2025 20:27
@github-actions github-actions bot added Azure.Core Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Jun 3, 2025
Copy link

github-actions bot commented Jun 3, 2025

Thank you for your contribution @chsienki! We will review the pull request and get back to you soon.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Removes an unused assembly symbol lookup from the generator pipeline to reduce performance overhead.

  • Eliminates the assemblyNameProvider and its Combine step.
  • Updates the tuple shape in the Combine.Select and signature of ReportDiagnosticAndEmitSource.
  • Removes extraction of data.Assembly.Name.
Comments suppressed due to low confidence (2)

sdk/core/System.ClientModel/gen/ModelReaderWriterContextGenerator.cs:95

  • [nitpick] The current Combine.Select chain uses deeply nested tuple deconstruction (data.Left.Left...). Consider deconstructing the combined tuple into named local variables or introducing a small record type to flatten the data for better readability.
.Select((data, _) => (

sdk/core/System.ClientModel/gen/ModelReaderWriterContextGenerator.cs:148

  • [nitpick] Since the Assembly tuple element was removed, the data tuple now has shifted positions. Consider deconstructing data in the method signature of ReportDiagnosticAndEmitSource to give each element a descriptive name rather than accessing them via data. properties.
var contextType = data.SymbolToTypeRefCache.Get(contextSymbol, data.SymbolToKindCache);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant