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

Remove some unnecessary string allocations in hosting layer #95801

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

elinor-fung
Copy link
Member

  • Make utils for ends_with and starts_with stop requiring a string
  • Avoid creating a string for tracing when tracing is not enabled

This removes ~2000 transient string allocations in starting a console app.

@ghost
Copy link

ghost commented Dec 8, 2023

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Make utils for ends_with and starts_with stop requiring a string
  • Avoid creating a string for tracing when tracing is not enabled

This removes ~2000 transient string allocations in starting a console app.

Author: elinor-fung
Assignees: -
Labels:

area-Host

Milestone: -

Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

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

Nice! Thanks a lot!

src/native/corehost/hostpolicy/deps_format.cpp Outdated Show resolved Hide resolved
@elinor-fung elinor-fung merged commit 6059d9f into dotnet:main Jan 4, 2024
180 checks passed
@elinor-fung elinor-fung deleted the hostStringAlloc branch January 4, 2024 22:33
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2024
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.

2 participants