Skip to content
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

Reduce enumerations and delegate invocations #28470

Conversation

paulomorgado
Copy link
Contributor

Replace the internal allocations of the used LINQ operators by a hashtable of assembly names.

Note: the existing code used Enumerable.Count() when Enumerable.Any() could be used.

@ghost ghost added the area-hosting label Dec 7, 2020
@Tratcher
Copy link
Member

Tratcher commented Dec 7, 2020

Thanks for the interest, but I don't think we need to work on this code path. The plan is to obsolete this component (#20964). It also only runs at startup so minor allocations aren't a concern.

@mkArtakMSFT mkArtakMSFT added community-contribution Indicates that the PR has been added by a community member and removed community-contribution Indicates that the PR has been added by a community member labels Dec 7, 2020
@davidfowl
Copy link
Member

We care now about rescuing startup time (as part of the inner loop improvements) so this is now fair game.

@Tratcher
Copy link
Member

Tratcher commented Dec 8, 2020

Note: the existing code used Enumerable.Count() when Enumerable.Any() could be used.

Not quite. Any means > 0, but the check in this code is > 1.

Copy link
Member

@Tratcher Tratcher left a comment

Choose a reason for hiding this comment

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

Approving because this is small and already done, but see our other conversation about focusing on more critical code paths.

@davidfowl
Copy link
Member

@Tratcher is right, this change is fine but we're going to be obsoleting this type so avoid making further changes here.

@Tratcher Tratcher self-assigned this Dec 8, 2020
@Tratcher Tratcher merged commit 9d65f3f into dotnet:master Dec 18, 2020
@Tratcher Tratcher added this to the 6.0-preview1 milestone Dec 18, 2020
@amcasey amcasey added the area-hosting Includes Hosting label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-hosting Includes Hosting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants