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

Replace costly global statics with local statics #190

Merged
merged 1 commit into from
Jul 15, 2020
Merged

Replace costly global statics with local statics #190

merged 1 commit into from
Jul 15, 2020

Conversation

chrdavis
Copy link
Member

When investigating performance traces on Windows I noticed there is a significant CPU and reference set impact due to this library's global statics. These get initialized on module load in every process - regardless if it uses the code. Change is to convert these globals in static locals that are created on demand.

@kimlaine
Copy link
Contributor

Great. Thanks for your contribution!

@kimlaine
Copy link
Contributor

Actually, could you do the PR to the contrib branch instead?

@chrdavis chrdavis changed the base branch from master to contrib July 11, 2020 03:22
@chrdavis
Copy link
Member Author

Actually, could you do the PR to the contrib branch instead?

Done!

@kimlaine kimlaine merged commit ec1420b into microsoft:contrib Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants