grpc-java
grpc-java copied to clipboard
when send 89M request body,it is cost 6 second? after user gzip,also
hello
i deploy a grpc client an a grpc server on the same linux pc
i send 89M req to server ,i find it very time-consuming,about 6~10 second
i guess it is network limit,so i use gzip,but is same problem
so i guess serialization cost so long time ,i print log below
i print log at onMessage serverintercepter,i think serialization is before onMessage
and generateobjnames is handle funtion
i find that during after onMessage and the handle funtion of generateobjnames is most cost time,why? i think it memory opration
please help me ? thank you very mush
Your log is showing that the time is being spent in some interceptor. The log message in generateObjNames
happens at the beginning, so the time is spent before that. You have 3 1/2 seconds between Serialization time
and when generateObjNames
is called. The code snippet you included has only Deserialization time
methods, so there must be some other part of your code where the serialization is happening and that seems to be where the time is spent.
Your log is showing that the time is being spent in some interceptor. The log message in
generateObjNames
happens at the beginning, so the time is spent before that. You have 3 1/2 seconds betweenSerialization time
and whengenerateObjNames
is called. The code snippet you included has onlyDeserialization time
methods, so there must be some other part of your code where the serialization is happening and that seems to be where the time is spent.
thank you very much,this is server intercepter,i think that it only have Deserialization time(binary to proto objects),why has Serialization time? if has Serialization time,i think that grpc self done?
I wonder if this is a question about HTTP/2 frame transmission, with the request headers arriving first at the server interceptor, followed by the request body, and all the time spent on transferring the request body Otherwise, I can't imagine deserialization taking so long, because it only takes a few hundred milliseconds for me to convert from a Java object to a Proto object.