News for hackers. Stuff that matters.
Re:Things I learnt making a fast website by mozumder on Friday December 23, 2016 @07:44PM (#13248039)
Pretty sure I have the fastest site in the world: https://www.futureclaw.com

Speed test: https://tools.pingdom.com/#!/FMRYc/http://www.futureclaw.com

Average page generation time from the database is 2-3ms & cached pages generate in 300 microseconds. Also, this includes GZip.

One day I'll write a blog post on it, but it's a Django app with a custom view controller. I use prepared statements and chunked encoding & materialized database views & all sorts of techniques I forgot that I need to write down. I also gzip data before storing in Redis, so now my Redis cache is automatically 10x bigger.

I just checked and it's faster than Hacker News: http://tools.pingdom.com/fpt/bHrP9i/http://news.ycombinator....

Re:Things I learnt making a fast website by ilarum on Friday December 23, 2016 @08:11PM (#13248102)
Impressive! You can do some more front-end stuff to improve the speed too, like adding a good CDN and optimising your images. For example, [1] is ~790KB which is great for viewing on a 5k iMac, but is probably unnecessary when someone is viewing your website from a low powered phone on a slow 3G connection. There are various tools like ImageOptim or Dexecure (which I work on) to solve this issue. See [1] and [2] for a comparision on how this single image can be compressed further.

[1] https://farm9.staticflickr.com/8380/29778359335_f59e0b4fcb_k... [2] https://bigdemosyncopt.dexecure.net/https://farm9.staticflic...

Note that [2] varies in size and format depending on your user agent and it becomes ~70KB when viewed from a chrome mobile device.

Re:Things I learnt making a fast website by mozumder on Friday December 23, 2016 @08:26PM (#13248138)
I do use PICTURE elements of various sizes, so it shouldn't be loading the 790kb version on a phone. Most likely either the 107kb version or the 220kb version.
Re:Things I learnt making a fast website by ilarum on Friday December 23, 2016 @08:46PM (#13248185)
Yep picture tag is really useful. I had tested on WPT and found a big image [1] so I assumed you hadn't taken care of this yet.

[1] ~500KB image on 3G mobile device and load time of ~15.9s (https://www.webpagetest.org/result/161224_M7_29Q/)

Re:Things I learnt making a fast website by wldlyinaccurate on Friday December 23, 2016 @08:41PM (#13248171)
I don't mean to detract from the great back-end time that you've managed to achieve, but I think it's important to point out that web performance is about _so_ much more than the back-end.

Using WebPagetest, you can test your page with real devices to get an idea of how it will load for users who are not on overpowered desktop devices hooked up to the Internet over a fibre connection. If you look at the "Filmstrip view" for futureclaw[0], you don't even see any text until ~4.7 seconds in, and the page doesn't look finished until well after 13 seconds because that image takes so long to come in. Hacker News, on the other hand, has content visible at 2.3 seconds[1].

So yes, back-end times are important. But it's a small slice of the overall load time. Just keep in mind that the proportion of people on mobile connections is actually going _up_ in the developed world, and the average speed of mobile connections is not improving. It's really important that we (web developers) recognise this and build sites that can be used by everyone, no matter the speed of their device or connection.

[0] https://www.webpagetest.org/result/161224_TS_264/ [1] https://www.webpagetest.org/result/161224_H9_26Z/

Re:Things I learnt making a fast website by mozumder on Friday December 23, 2016 @09:03PM (#13248230)
One thing to keep in mind is the audience itself. You tuned the benchmark for one specific audience.

You'll find that in the fashion industry, not a lot of people are browsing expensive dresses on 3G connections on older devices in third-world countries.

Also, for connection speeds, that's going to be affected by the fact that Hacker News doesn't serve pictures, which you sorta have to do for fashion.

Re:Things I learnt making a fast website by inian on Friday December 23, 2016 @09:59PM (#13248350)
True that you need to keep your audience in mind but doesn't lend well to your claim of being the fastest site in the world either if it is fast for only a subset of people in the world
Re:Things I learnt making a fast website by dom0 on Saturday December 24, 2016 @05:29AM (#13249279)
> Speed test: https://tools.pingdom.com/#!/FMRYc/http://www.futureclaw.com > > 580 ms

The backend number is nice, really, but the quoted load time by the tool isn't. My jenkins loads almost as fast, (and according to the tool faster than HN), and isn't even hosted in a DC. Some pages hosted on the same machine load in almost a quarter of that. Most of that is internet latency, the same pages requested from the same network take just a couple ms. Even Jenkins only takes 65 ms for /.

Re:Things I learnt making a fast website by aibottle on Saturday December 24, 2016 @07:54AM (#13249617)
Its only good if you have good network conditions. For me, sitting in a hotel in Europe it takes 19 Secs to load. 49 Reqs/Page Load is just awfully much. Also the fastest website by far is blog.fefe.de, 2 reqs/pageload. Also written in C.
Re:Things I learnt making a fast website by sazers on Saturday December 24, 2016 @04:38AM (#13249192)
That was really fast, felicitation!
Re:Things I learnt making a fast website by girzel on Friday December 23, 2016 @07:46PM (#13248046)
Blog about it!
Re:Things I learnt making a fast website by mozumder on Friday December 23, 2016 @08:01PM (#13248077)
Will do in Spring, as it becomes more feature complete. (search, articles, user blogging, etc..) All compounded by the fact that I also do the content for the site.

Anyone want to turn this into a platform product?