Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
sync: decide whether to keep Pool #6984
+1. In developing the Couchbase Sync Gateway we've run into several situations where it was difficult to cache expensive resources without bloating the GC heap. A GC-aware cache like Pool would really help. (Haven't tried it yet, as we're still developing on Go 1.2.) Please release it in 1.3.
I've been using sync.Pool in my personal projects and it has been a huge performance win. For me this has shifted the line where I decided what I can code in C and what I can code in Go farther to Go's favor. If I revert from pool I see massive degradation including an order of magnitude greater heap usage and what I think are GC pauses. Of course I would never actually do that and if this went away I could still use some of the custom pool's I used to use (or write in C), but their performance doesn't compare favorably due to lack of thread-local pooling.