[core] Minor improvement for session#48711
Merged
pcmoritz merged 2 commits intoray-project:masterfrom Nov 13, 2024
Merged
Conversation
Signed-off-by: dentiny <dentinyhao@gmail.com>
dentiny
commented
Nov 12, 2024
|
|
||
| void on_connect(beast::error_code ec, tcp::resolver::results_type::endpoint_type) { | ||
| if (ec) { | ||
| Failed(ray::Status::NotFound("on_connect " + ec.message())); |
Contributor
Author
There was a problem hiding this comment.
The implementation creates multiple temporary strings, absl::StrCat only creates one.
dentiny
commented
Nov 12, 2024
| : io_context_(io_context), | ||
| session_pool_(session_pool_size), | ||
| address_(address), | ||
| port_str_(std::to_string(port)), |
Contributor
Author
There was a problem hiding this comment.
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.
rynewang
approved these changes
Nov 12, 2024
JP-sDEV
pushed a commit
to JP-sDEV/ray
that referenced
this pull request
Nov 14, 2024
Some minor improvements for session implementation. Signed-off-by: dentiny <dentinyhao@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some minor improvements for session implementation.