Re: [go-nuts] [design] HTTP server serving heavy computing : Handle HTTP request closed prematurely

2020-06-21 Thread Thomas S
y here, but I expect this to be at least a little > faster than a select. > > In any case, these things must happen explicitly: code that wants to be > responsive to cancellation signals must be programmed as such. > > > On Fri, Jun 19, 2020 at 3:58 PM Thomas S > > wrot

[go-nuts] [design] HTTP server serving heavy computing : Handle HTTP request closed prematurely

2020-06-19 Thread Thomas S
Hello, I have an HTTP server providing heavy algorithms. Sometimes, the clients closes the connection prematurely, before the end of computing. Note : Sometimes the client consuming these algorithms want to stop the process if the solution is not found before X minutes for example. This articl

Re: [go-nuts] Best design to copy a struct

2020-04-21 Thread Thomas S
I did not know this stylistic guideline. Thank you Ian ! Le mardi 21 avril 2020 00:42:39 UTC+2, Ian Lance Taylor a écrit : > > On Mon, Apr 20, 2020 at 1:56 PM Thomas S > > wrote: > > > > In regexp package, the "copy" function is implemented like this

[go-nuts] Best design to copy a struct

2020-04-20 Thread Thomas S
Hello, In regexp package, the "copy" function is implemented like this : func (re *Regexp) Copy() *Regexp { 118re2 := *re 119return &re2 120 } But most of the time for getting a copy of a struct, I do something like this : func (re Regexp) Copy() *Regexp { 119

[go-nuts] Elastic synchronised logging : What do you think ?

2019-03-16 Thread Thomas S
Hello, I have a software needing a lot of logs when processing. I need to : 1- Improve the processing time by doing non-blocking logs 2- Be safe with goroutines parallel logs fmt package doesn't match with (1) & (2) log package doesn't match with (1) *Here is my proposal. What do you think ?*

Re: [go-nuts] Find biggest memory holder

2019-02-07 Thread Thomas S
ize of the objects pointed to are changing. > > The question is not very clear though. > > > On Feb 7, 2019, at 12:33 PM, Ian Lance Taylor > wrote: > > > > On Thu, Feb 7, 2019 at 2:33 AM Thomas S > wrote: > >> > >> But now, to go forward, I

[go-nuts] Find biggest memory holder

2019-02-07 Thread Thomas S
Hello, I work on a service using a big amount of RAM memory (500-100MB). Most of them is used by global variable, it's pre-processed data, allowing the service to answer quickly. However, I'm working on improving the RAM consumption. I generated PDF callgraphs with pprof. Some elementary upgrad

[go-nuts] Json decode : Monitoring errors properly

2018-12-26 Thread Thomas S
Sorry I don't get it ? My decoder is already built with it. Thank you, Thomas -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegrou

[go-nuts] Json decode : Monitoring errors properly

2018-12-26 Thread Thomas S
Hello, I need help to improve the reliability of a proxy and numerous servers in Golang, currently in use by a certain number of users. I receive json stream by TCP and websocket. The only way to do it properly is to used json decode. (notably because websocket payload system can split in mul

[go-nuts] How to monitor "Out of memory" crash

2018-10-05 Thread Thomas S
Hello, My service crash because "panic - out of memory", and I'm not sure how to monitore it. I just want to know, when it crashes, where are the main memory allocations, to understand the problem. It is pretty sudden, I can hardly use pprof in real time. And has it crashed, pprof can't produc

Re: [go-nuts] Re: Perf : Multithreaded goroutines files I/O

2018-09-17 Thread Thomas S
Thank you ! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Re: [go-nuts] Re: Perf : Multithreaded goroutines files I/O

2018-09-17 Thread Thomas S
Is my time display method wrong ? t := time.Now() // Process fmt.Println(time.Since(t)) Le dimanche 16 septembre 2018 22:54:33 UTC+2, Michael Jones a écrit : > > don't be confused about internal process time and external wall clock time > here. > > On Sun, Sep 16, 2018 at 11:27 AM Thomas Solign