Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Change allocation ofMethodData structures to do less unnecessary work#96857

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

davidwrighton
Copy link
Member

While debugging performance issues with process startup from a customer, I noticed that we spent a measurable amount of time in the OS memory allocator allocating the memory forMethodData structures.

I found a couple of things

  • We were creatingMethodDataObject structures that contained information about all methods (including non-virtuals) when most uses within the type loader were both non-cacheable creations, and ignored all non-virtual functions.
    • Add a concept of allocating and filling either a fullMethodDataObject or one that only had virtuals in it.
  • When allocating the memory forMethodDataInterfaceImpl structures we were allocating it based on the number of methods on the type, but we were only utilizing the memory associated with the number of virtuals on the type. Change to allocate the correct size.
  • We had a case where we only needed to get theMethodData if it existed in the cache, and update the cached copy. Adjust the path so that it can avoid allocating theMethodData at all in that case.

- Compute exact amount of memory to allocate- Only generate data for virtuals in most cases
@davidwrightondavidwrighton merged commitde04898 intodotnet:mainJan 25, 2024
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 25, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@AaronRobinsonMSFTAaronRobinsonMSFTAaronRobinsonMSFT approved these changes

@elinor-fungelinor-fungAwaiting requested review from elinor-fung

Assignees

@davidwrightondavidwrighton

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@davidwrighton@AaronRobinsonMSFT

[8]ページ先頭

©2009-2025 Movatter.jp