TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I rewrote my blog in Go

132 pointsby hermanschaafalmost 12 years ago

18 comments

jbailalmost 12 years ago
<i>&quot;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.&quot;</i><p>So...the Python&#x2F;Django to Go&#x2F;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.
评论 #6212454 未加载
评论 #6212463 未加载
评论 #6212381 未加载
评论 #6213067 未加载
onion2kalmost 12 years ago
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&#x27;s important. Then move on to a problem that doesn&#x27;t already have an optimal solution, and share the solution if you&#x27;re nice. That&#x27;s how <i>everything</i> should be done.
评论 #6211837 未加载
评论 #6213095 未加载
评论 #6211843 未加载
hamoidalmost 12 years ago
&quot;I removed the Disqus comments&quot;<p>Wouldn&#x27;t that by itself be enough to account for the download time differences?
评论 #6211364 未加载
评论 #6211420 未加载
评论 #6211394 未加载
islonalmost 12 years ago
It seems that people on hn just fell in love with go. So many new articles lately. It&#x27;s like the node.js fever all over again.
评论 #6211813 未加载
评论 #6211822 未加载
lbarrowalmost 12 years ago
How did you achieve a 16 second response time for your <i>blog</i>? What the heck were you doing?
评论 #6211879 未加载
评论 #6212214 未加载
评论 #6212981 未加载
评论 #6212619 未加载
learc83almost 12 years ago
I built a small site in Go and I didn&#x27;t really see the need to use a framework. Here&#x27;s what I did for routes.<p><pre><code> func getRoutes() map[string]customHndlrFnc { r := make(map[string]customHndlrFnc) &#x2F;&#x2F;routes r[&quot;&#x2F;route_to_url&quot;] = handler r[&quot;&#x2F;route_to_url2&quot;] = 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.
评论 #6214059 未加载
ChikkaChiChialmost 12 years ago
After playing around with an Arduino in my spare time, I&#x27;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&#x27;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&#x27;t have any projects that force me to start rebuilding my libraries from scratch.
评论 #6211953 未加载
rartichokealmost 12 years ago
I&#x27;m not sure why you wouldn&#x27;t cache anything. It doesn&#x27;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.
cocoflunchyalmost 12 years ago
OT but please don&#x27;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:&#x2F;&#x2F;projecteuler.net&#x2F;about</a>, section &quot;I learned so much solving problem XXX so is it okay to publish my solution elsewhere?&quot;).<p>You can put the solutions in the dedicated thread on the site though if you want to share :)
评论 #6211895 未加载
评论 #6211830 未加载
Jgrubbalmost 12 years ago
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:&#x2F;&#x2F;i.imgur.com&#x2F;8esmvJS.png</a>
mcantrellalmost 12 years ago
You forgot to provide an RSS feed of your blog posts.
OhHeyItsEalmost 12 years ago
~15 secs to load a blog post??? Sorry - that&#x27;s not a problem w&#x2F; Django. Something else goofy going on here. Whether or not Go&#x2F;Revel is ninjarockstar faster than Python&#x2F;Django, I don&#x27;t think this is the benchmark to prove it.
philip1209almost 12 years ago
Source code:<p><a href="https://github.com/hermanschaaf/ironzebra" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hermanschaaf&#x2F;ironzebra</a>
jwcruxalmost 12 years ago
|and I decided to give it a go.<p>Never gets old.
vphalmost 12 years ago
I think the comparison is a little misleading as the author admitted that the newer version is slimmer and tighter. Django is heavy. It&#x27;d be interesting if somehow the author could have used Bottle (Python) and compare it to Revel (Go).
bdcravensalmost 12 years ago
Anytime you move rendering off the client (Disqus) you&#x27;ll see performance increases. Everyone is focused on server-side speed, though most of the load time is network latency and DOM rendering.
ukandyalmost 12 years ago
Heroku, MongoDB, Go, Revel, Bootstrap, with a sprinkling of overkill..
评论 #6213695 未加载
boromialmost 12 years ago
How many Go articles do we need a day? Google must be desperate.<p>Tomorrow: How I rewrote my bedroom and kitchen using Go and saved lives.