Skip to content

Conversation

@benaadams
Copy link
Member

@benaadams benaadams commented Nov 15, 2020

Rather than going via CustomAttributeData.GetCustomAttributeRecords and creating an array, iterate the attributeTokens directly.

Also has the advantage of early out rather than iterating every element to create the array then iterating it again for the test.

Startup allocations for ASP.NET MVC app

Before

image

After

image

Contributes to #44598

/cc @jkotas @stephentoub

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thank you

@jkotas jkotas merged commit 25260d1 into dotnet:master Nov 15, 2020
@benaadams benaadams deleted the IsCustomAttributeDefined branch November 15, 2020 03:41
@ghost ghost locked as resolved and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants