Repository navigation
[core] Remove extra copy through proxy on every worker server request - #59245
Conversation
Signed-off-by: dayshah <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request introduces a performance optimization in the CoreWorkerServiceHandlerProxy by using std::move to forward requests and callbacks. This avoids unnecessary copies for every worker server request, which is particularly beneficial when dealing with large objects. The change is correct, well-contained within a macro, and the inclusion of the <utility> header is appropriate. I find no issues with this change.
|
LGTM! Adding a bit more context for reviewers: Ideally, the io_context thread would call CoreWorker methods directly. But due to the startup ordering issue described here: ray/src/ray/core_worker/core_worker_rpc_proxy.h Lines 36 to 44 in 9bfd0d7 every request needs to go through the Proxy first, which then forwards it to CoreWorker. Since this path is hit for every worker RPC, using |
Description
Found that there's an extra unnecessary copy on every worker request through the CoreWorkerServiceHandlerProxy. This ends up dominating io context time in cases where you're streaming back lots of large objects (tested through config var to bump up max inline size).