<i>"I am now loading less static assets. I removed the Disqus comments and the many many lines of CSS from the old site and replaced it with only a couple of lines of CSS alongside a CDN-hosted copy of Twitter Bootstrap. Finally, the Go site is deployed to a free instance of Heroku and the MongoDB hosted on a developer version of Mongolab, while the old Django site was hosted on a Webfaction shared server."</i><p>So...the Python/Django to Go/Revel comparison is basically worthless then? These are huge changes that completely invalidate any speed improvement the author is trying to prove are a result of using Go.<p>A lot of upvotes for an article with an obviously flawed conclusion.
While rewriting things in different language is fun (and fun is a <i>great</i> reason to do stuff), the speed of delivering what is ostensibly static content is a solved problem. This was completely unnecessary. Bake the blog post into static HTML and tune up Nginx to shove it down the wires as fast as possible. Stick it on an CDN somewhere if it's important. Then move on to a problem that doesn't already have an optimal solution, and share the solution if you're nice. That's how <i>everything</i> should be done.
I built a small site in Go and I didn't really see the need to use a framework. Here's what I did for routes.<p><pre><code> func getRoutes() map[string]customHndlrFnc {
r := make(map[string]customHndlrFnc)
//routes
r["/route_to_url"] = handler
r["/route_to_url2"] = handler2
return r
}
for key, value := range getRoutes() {
http.HandleFunc(key, handlerWrapper(value))
}
</code></pre>
All of my routes for this sample were get requests but it could easily be extended.
After playing around with an Arduino in my spare time, I've realized how important it is to start thinking in multi-threaded concepts in programming. Nothing makes a better example than watching delay(); physical prevent your sketch from taking the next step.<p>Golang (Still can't believe Google would release a language so piss poor for SEO) WILL be the language I pursue when I start down this path, but right now I don't have any projects that force me to start rebuilding my libraries from scratch.
I'm not sure why you wouldn't cache anything. It doesn't matter if x is faster than y. If both were cached the difference might be milliseconds and in the real world that is what will happen.
OT but please don't put the solutions for Project Euler problems on GitHub, it is directly against the rules (<a href="http://projecteuler.net/about" rel="nofollow">http://projecteuler.net/about</a>, section "I learned so much solving problem XXX so is it okay to publish my solution elsewhere?").<p>You can put the solutions in the dedicated thread on the site though if you want to share :)
For the record, this is the same graph after moving my Drupal based blog from Media Temple to Linode. Nothing else changed. So yes, hosting can make that magnitude of a difference. <a href="http://i.imgur.com/8esmvJS.png" rel="nofollow">http://i.imgur.com/8esmvJS.png</a>
~15 secs to load a blog post???
Sorry - that's not a problem w/ Django. Something else goofy going on here. Whether or not Go/Revel is ninjarockstar faster than Python/Django, I don't think this is the benchmark to prove it.
I think the comparison is a little misleading as the author admitted that the newer version is slimmer and tighter. Django is heavy. It'd be interesting if somehow the author could have used Bottle (Python) and compare it to Revel (Go).
Anytime you move rendering off the client (Disqus) you'll see performance increases. Everyone is focused on server-side speed, though most of the load time is network latency and DOM rendering.