-
Notifications
You must be signed in to change notification settings - Fork 914
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
Frequently allocating in x509.parseCertificate (to repeatedly parse the same certificate) #1032
Comments
Here's a sample stack trace
|
kevinburke1
added a commit
to kevinburke1/pq
that referenced
this issue
Mar 25, 2021
Previously, we would reload and re-parse a certificate from disk every single time we initialized a connection and the sslrootcert setting was enabled. This results in a lot of allocations that can be avoided. Instead, save the *tls.Config for a given configuration hash, and reuse it when we see it again. Fixes lib#1032.
kevinburke1
added a commit
to kevinburke1/pq
that referenced
this issue
Mar 25, 2021
Previously, we would reload and re-parse a certificate from disk every single time we initialized a connection and the sslrootcert setting was enabled. This results in a lot of allocations that can be avoided. Instead, save the *tls.Config for a given configuration hash, and reuse it when we see it again. Fixes lib#1032.
kevinburke1
added a commit
to kevinburke1/pq
that referenced
this issue
Mar 25, 2021
Previously, we would reload and re-parse a certificate from disk every single time we initialized a connection and the sslrootcert setting was enabled. This results in a lot of allocations that can be avoided. Instead, save the *tls.Config for a given configuration hash, and reuse it when we see it again. Fixes lib#1032.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My program provides a custom sslrootcert. Every time sql opens a new connection (which happens fairly frequently), the same certificate is re-parsed.
It would be good to check to see if we have parsed the certificate before and then reuse it instead of repeatedly doing the same work over and over again.
The text was updated successfully, but these errors were encountered: