On Fri, Jun 7, 2019 at 9:01 AM Ronny Bangsund <ronny.bangs...@gmail.com> wrote:
>
> Yes, the built-in is pretty awful in many ways. There are fortunately lots of 
> alternatives, all with roughly an order of magnitude better performance. I 
> inspected this list yesterday to finally make a choice of packages to use: 
> https://github.com/smallnest/go-web-framework-benchmark
>
> I ended up with the following as my weapons of choice:
> - https://github.com/valyala/fasthttp (the core HTTP server)
> - https://github.com/fasthttp/router (paths)
> - https://github.com/phachon/fasthttpsession (sessions/non-REST stuff)

Some time ago somebody posted a memory corruption problem which turned
out to be a race condition in one of these fasthttp libraries. Some of
the optimizations rely heavily on unsafe use.



>
> There are other packages near the performance of fasthttp, and sometimes you 
> just want "good enough" performance to gain some conveniences. Most, if not 
> all, are likely to be better choices for performance than the Go http 
> package. The ones above just looked most agreeable to me :)
>
> For template engines, it depends on your needs. If you're preparing pages to 
> serve them statically the standard packages are fine (html/template, or even 
> text/template for certain uses). If you're constantly rebuilding pages you'll 
> want to look into faster template engines.
>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/19767e83-c498-4842-b41c-145730775c05%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAMV2RqrSBLn9E_SyF-T2M7sJCFP7hrLA8aMrjxy9bs_ek3_j_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to