Skip to content

Conversation

@dentiny
Copy link
Contributor

@dentiny dentiny commented Nov 12, 2024

Some minor improvements for session implementation.

@dentiny dentiny requested review from jjyao and rynewang November 12, 2024 23:09

void on_connect(beast::error_code ec, tcp::resolver::results_type::endpoint_type) {
if (ec) {
Failed(ray::Status::NotFound("on_connect " + ec.message()));
Copy link
Contributor Author

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)),
Copy link
Contributor Author

@dentiny dentiny Nov 12, 2024

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.

@rynewang rynewang enabled auto-merge (squash) November 12, 2024 23:14
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Nov 12, 2024
@github-actions github-actions bot disabled auto-merge November 13, 2024 01:21
@pcmoritz pcmoritz merged commit e393a71 into ray-project:master Nov 13, 2024
5 checks passed
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 <[email protected]>
mohitjain2504 pushed a commit to mohitjain2504/ray that referenced this pull request Nov 15, 2024
Some minor improvements for session implementation.

Signed-off-by: dentiny <[email protected]>
Signed-off-by: mohitjain2504 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-backlog go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants