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 work done in global constructors #501

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

ras0219-msft
Copy link
Contributor

While doing some performance analysis, two global constructors showed up in the trace.

Changes:

  1. Initialize the BCrypt algorithm handles on first use using function statics.
  2. There is no need to initialize the MetricsMessage with a random id+timestamp -- those are always filled by Metrics::enable().

@ras0219-msft ras0219-msft merged commit f92f59b into microsoft:main Apr 11, 2022
@ras0219-msft ras0219-msft deleted the dev/roschuma/startup branch April 11, 2022 23:42
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