4 ms·
"Speed and memory efficiency: I haven’t measured" - ok. "In addition, threading in Python performs poorly due to GIL" - ok. Last time I created a simple web se
by themoriarty 15y ago
"Speed and memory efficiency: I haven’t measured" - ok.
"In addition, threading in Python performs poorly due to GIL" - ok.
Last time I created a simple web service with Go it leaked like a hell.
- uriel 15y agoIf you are using the 32bit compilers, there were issues with the garbage collector for a while, in any case you should always use the 6g 64bit compilers for any serious work, they are much better tested and generate more efficient output. Other than the issue with the 32bit compilers, I don't remember hearing of any leaks in Go.
- DisposaBoy 15y agoI'm only guessing here but I'd say it wasn't actual leaking but likely something like firing off 100 goroutines all of which end up on real threads(possibly because they're blocking or something) so the peak memory increases since none of the threads are recycled. This can be trivially reproduced by running X goroutines each of them downloading a web-page many of which takes say at least 1 second. Memory-use will simply grow as is expected(or not). I guess it's also worth mentioning that from experience it's often faster and more efficient to multiplex those 100 downloads onto a max of say 10 goroutines/threads.