Try https://github.com/pquerna/ffjson to improve speed and reduce garbage generation. This in combination with sync.Pool will increase your throughput by A LOT.
On Thursday, October 27, 2016 at 10:29:01 AM UTC+8, 刘桂祥 wrote: > > > In my server many requests need to handle a loop to unmarshal json > strings and I find gc is very frequency > > > > -- 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.