-
Notifications
You must be signed in to change notification settings - Fork 102
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 String.format calls #2733
Comments
alecgrieser
added a commit
to alecgrieser/fdb-record-layer
that referenced
this issue
May 22, 2024
This removes as many `String.format` calls as could be done. For the most part, these were just using `%s` or `%d`, which can be replaced with String concatenation. For error messages, an effort was made to move the interpolated data into log message keys where appropriate so that the error messages are static strings (as much as possible), which is useful when trying to group together related errors in a production environment. This resolves FoundationDB#2733.
alecgrieser
added a commit
to alecgrieser/fdb-record-layer
that referenced
this issue
May 23, 2024
This removes as many `String.format` calls as could be done. For the most part, these were just using `%s` or `%d`, which can be replaced with String concatenation. For error messages, an effort was made to move the interpolated data into log message keys where appropriate so that the error messages are static strings (as much as possible), which is useful when trying to group together related errors in a production environment. This resolves FoundationDB#2733.
alecgrieser
added a commit
to alecgrieser/fdb-record-layer
that referenced
this issue
May 23, 2024
This removes as many `String.format` calls as could be done. For the most part, these were just using `%s` or `%d`, which can be replaced with String concatenation. For error messages, an effort was made to move the interpolated data into log message keys where appropriate so that the error messages are static strings (as much as possible), which is useful when trying to group together related errors in a production environment. This resolves FoundationDB#2733.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We've encountered a few problems with
String.format
. Namely:String.format
calls in hot code paths. While we could theoretically remove the call only in hot paths, it may be easier to just remove the call entirely.We should consider removing them all and just relying on String concatenation, which is faster and more reliable.
The text was updated successfully, but these errors were encountered: