lizining1231 commented on PR #3706: URL: https://github.com/apache/dubbo-go/pull/3706#issuecomment-5501778824
> Good job.Please provide some additional explanation:This optimization primarily targets small, CPU-dominated unary requests. The fast path buffers the complete request body before submitting it to the transport. For large or highly concurrent requests, memory residency and buffer growth may increase, and the performance benefit is not guaranteed. The current implementation does not automatically fall back based on payload size.However, judging from the size of the data you test, it already covers most scenarios of RPC business, and particularly large packages are also considered abnormal situations. Just add the above explanation to it Thanks for your review! I've also tested and confirmed the performance boundaries. The main benefit of the fast path is for messages in the range of 128 B ~ 32 KiB, and I've added comments in the code as suggested. Changes: 1. `protocol/triple/triple_protocol/unary_fastpath.go` — comment for the `unaryFastPathCall` type 2. `protocol/triple/triple_protocol/option.go` — comment for the `WithUnaryFastPath()` option The comments added in both places are worded identically: ```go // This optimization primarily targets small, CPU-dominated unary requests, // roughly in the 128 B to 32 KiB range: the complete request body is // buffered before it is submitted to the transport. For large or highly // concurrent requests, memory residency and buffer growth may increase, and // the performance benefit is not guaranteed. The implementation does not // automatically fall back based on payload size. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
