-
Notifications
You must be signed in to change notification settings - Fork 7k
[core] Minor improvement for session #48711
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
[core] Minor improvement for session #48711
Conversation
Signed-off-by: dentiny <[email protected]>
|
|
||
| void on_connect(beast::error_code ec, tcp::resolver::results_type::endpoint_type) { | ||
| if (ec) { | ||
| Failed(ray::Status::NotFound("on_connect " + ec.message())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation creates multiple temporary strings, absl::StrCat only creates one.
| : io_context_(io_context), | ||
| session_pool_(session_pool_size), | ||
| address_(address), | ||
| port_str_(std::to_string(port)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::to_string is known to suffer hidden performance issue, with a global lock for timezone.
Copy from doc:
std::to_string relies on the current C locale for formatting purposes, and therefore
concurrent calls to std::to_string from multiple threads may result in partial
serialization of calls.
Some minor improvements for session implementation. Signed-off-by: dentiny <[email protected]>
Some minor improvements for session implementation. Signed-off-by: dentiny <[email protected]> Signed-off-by: mohitjain2504 <[email protected]>
Some minor improvements for session implementation.