[go-nuts] Re: Memory Leak in bytes.Buffer String() method

2020-08-30 Thread Sarath Prabath Redlapalli Jaya
+5:30 Sarath Prabath Redlapalli Jaya wrote: > Hi, we've been observing high memory usage in the following code > https://github.com/Masterminds/squirrel/blob/master/placeholder.go#L113 > > We measured from pprof of heap > > (pprof) top20 > > Showing nodes accou

[go-nuts] Memory Leak in bytes.Buffer String() method

2020-08-30 Thread Sarath Prabath Redlapalli Jaya
Hi, we've been observing high memory usage in the following code https://github.com/Masterminds/squirrel/blob/master/placeholder.go#L113 We measured from pprof of heap (pprof) top20 Showing nodes accounting for 360.07MB, 91.31% of 394.32MB total Dropped 142 nodes (cum <= 1.97MB) Showing top 20

[go-nuts] Clean Architecture in Go - Dynamic Projection

2020-08-13 Thread Sarath Prabath Redlapalli Jaya
Hi All, We've a complex and nested Domain Object *User* type User struct { Profile *Profile // .. // .. } stored in a SQL database as id, user_name, email, image(*Profile*), category(Profile) Using Clean Architecture by having SQL Database behind an interface, how can we best implemen

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

2020-04-30 Thread Sarath Prabath Redlapalli Jaya
Andersen < jesper.louis.ander...@gmail.com> wrote: > 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

[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