You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/11/04 03:10:45 UTC

[GitHub] [kafka] chia7712 commented on pull request #9401: KAFKA-9628 Replace Produce request/response with automated protocol

chia7712 commented on pull request #9401:
URL: https://github.com/apache/kafka/pull/9401#issuecomment-721487169


   @lbradstreet Thanks for your response.
   
   >  is this the overall broker side regression since you need both the construction and toStruct?
   
   you are right and it seems to me the solution to fix regression is that server should use automatic protocol response rather than wrapped response. However, it may make a big patch so it would be better to address in another PR. (BTW, fetch protocol has similar issue https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/requests/FetchResponse.java#L281)
   
   > Could you please also provide an analysis of the garbage generation using gc.alloc.rate.norm?
   
   construction regression:
      - 3.293 -> 580.099 ns/op
      - 24.000 -> 2776.000 B/op
   
   toStruct improvement:
     - 825.889 -> 318.530 ns/op
     - 2208.000 -> 896.000 B/op
   
   We can reduce the regression (in construction) by replacing steam APIs by for-loop. However, I prefer stream Apis since it is more readable and the true solution is to use auto-generated protocols on server-side.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org