Re: [go-nuts] json decode is very slow

2020-05-03 Thread Amnon Baron Cohen
Excellent advice Jesper! On Sunday, 3 May 2020 10:34:12 UTC+1, Jesper Louis Andersen wrote: > > The general rule is to run a corollary of Dijkstra: experiments can only > show the presence of problems in a system, not their absence :) > > That is, seek to validate your assumptions rather than try

Re: [go-nuts] json decode is very slow

2020-05-03 Thread Jesper Louis Andersen
The general rule is to run a corollary of Dijkstra: experiments can only show the presence of problems in a system, not their absence :) That is, seek to validate your assumptions rather than trying to guess what is wrong with the system. The obvious things to check against are HTTP/1.1 vs HTTP/2

Re: [go-nuts] json decode is very slow

2020-04-30 Thread Sarath Prabath Redlapalli Jaya
Thanks Amnon & Hi Jesper, You're correct. Most of the time is actually spent in *ioutil.ReadAll()* . Trying to debug network issues related to GCP, GKE & the functionality of ISTIO sidecar reverse proxy, but seems okay so far couldn't find anything. But, I've performed an interesting experiment.

Re: [go-nuts] json decode is very slow

2020-04-30 Thread Jesper Louis Andersen
On Tue, Apr 28, 2020 at 6:48 PM Sarath Prabath Redlapalli Jaya < harrysarath2...@gmail.com> wrote: > We've instrument the above code block and reading request body bytes is > taking very long i.e., upto 5 secs sometimes reaching upto 20 seconds at the > throughput of ~4-5K RPM > > > The Request

[go-nuts] json decode is very slow

2020-04-28 Thread Sarath Prabath Redlapalli Jaya
req := &mystruct{} json.NewDecoder(r.Body).Decode(req) We've instrument the above code block and reading request body bytes is taking very long i.e., upto 5 secs sometimes reaching upto 20 seconds at the throughput of ~4-5K RPM The Request Body Size Metrics are as follows Average: 73190 Byt