mroth/phoenix-showdown

Martini improvement

ProTip opened this issue · 1 comments

I was curious about the slowness of Martini so I did some profiling and discovered that the Static middleware always runs even when routes match. This in turn causes a lot of system calls for opening directories and files. I got a nice boost by disabling this(it's not actually used in this benchmark anyway). If you're still looking at any of this I'd be curious to see what numbers you get by not setting up the Static middleware. I might chase this up with the Martini guys and see if there is a way to ensure it runs after the route matching.

Thanks @ProTip. Most of the other frameworks also do static file as default, but good to note it makes a difference to disable it. Also, we just integrated another Go based framework with improved performance characteristics!