5 ms·
If you want to see an even faster "forum", see http://forum.dlang.org/ http://forum.dlang.org/
by FraaJad 11y ago
If you want to see an even faster "forum", see
http://forum.dlang.org/ http://forum.dlang.org/
- jonahx 11y agoThat's impressive. What is their architecture?
- aw3c2 11y agohttp://forum.dlang.org/help#about http://forum.dlang.org/help#about says > This website is a web frontend to the DigitalMars NNTP server and mailing lists. It is part of DFeed, which is also a D news aggregator and IRC bot. > DFeed was written mostly by Vladimir Panteleev. Portions (including style and graphics) are Copyright © by Digital Mars. The source code is available under the GNU Affero General Public License on GitHub: https://github.com/CyberShadow/DFeed https://github.com/CyberShadow/DFeed Probably as static as possible, speed is easy then.
- mootothemax 11y ago>Probably as static as possible, speed is easy then. With an empty cache, every asset except font awesome is getting to me - here in Poland - in under 200ms, with some under 150ms. For 22 requests - even with a total payload of "only" 155kb - whether static or not, that is seriously impressive.
- colloqu 11y agoThis one is crazy. How are they so fast?
- currysausage 11y agoNo, forum.dlang.org is not crazy-fast. Other sites are crazy-slow. Write compact and easy-to-render HTML, it's no rocket science. Write some trivial CSS, you don't need Bootstrap. Make something dead-simple and call it flat design. If you have more than one stylesheet, concatenate them into one. Consider minifying. You don't need a 200 kB JS framework in order to fade in some hover menu. If you do need more than one JS file, concatenate them into one. Minify/uglify and move the <script> tag to the bottom of your HTML. You don't need 2 MB worth of stock photos. Recently, there was a page on HN with an uncompressed 12 MB banner photo. That is insane. You don't need those heavyweight social plugins, they ruin your day (performance-wise). If your content is great, people will find a way to share. If your boss specifically asks for Facebook and Twitter buttons, just link to https://www.facebook.com/sharer/sharer.php?u=http://www.example.com https://www.facebook.com/sharer/sharer.php?u=http://www.exam... and https://twitter.com/home?status=This%20is%20great:%20http://www.example.com https://twitter.com/home?status=This%20is%20great:%20http://.... [1] Don't just embed YouTube iframes, they are even worse. Use yt-embed.js [2]. Is a web font really necessary? If it is, do you really need Bold Italic? Sure as hell you don't need Ultralight+Light+Semilight+Regular+Bold, just because there is one ubercool Ultralight tagline in the footer. Make sure Nginx or Apache gzip HTML, CSS and JS and send far-future Expires headers for all your static assets. Make sure that there are no redirects, they add latency. If you follow these simple rules, your page weighs under 50 kB and needs no more than 10 HTTP requests. You don't even need complicated CMS caching and CloudFlare. But hey, there are some 10,000 cache plugins for WordPress, just install one. [1] http://www.sharelinkgenerator.com/ http://www.sharelinkgenerator.com/ [2] https://gist.github.com/do18/09761dfabf60689b2cd8 https://gist.github.com/do18/09761dfabf60689b2cd8
- mootothemax 11y ago>No, forum.dlang.org is not crazy-fast. Other sites are crazy-slow. You're ignoring that this site does use jQuery and webfonts and loads all of those pretty avatars separately. 22 requests, at my count. For the reasons you list - i.e. words to the effect of "don't use all of this stuff" - I think that it is impressively fast, and their achievement shouldn't be hand-waved away quite so readily.
- currysausage 11y agoI'm not ignoring anything, I'm describing the philosophy behind sites like these: It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove. [1] Many seem to believe that there is some secret sauce involved in making web pages load fast. There isn't. Server-side caching is no rocket science. The key is to keep everything so simple that you have the overview over every delivered byte at all times. Take a look at the HTML of forum.dlang.org. It's so simple, if it wasn't minified, I could immediately start working on this site. When someone asks me to work on some existing wiki or blog template, I usually spend an hour removing unused code first and I still struggle to find my way around the codebase. At that point, maintaining efficiency becomes impossible. When you have a simple codebase, you may add a font, avatars, and jQuery. The trick is to think about whether you need it, not throw it in "just in case." Specifically, some tiny avatars won't hurt overall performance as long as the page doesn't need to be redrawn. Therefore, always specify width and height attributes for your img elements in HTML or CSS. [1] https://en.wikiquote.org/wiki/Antoine_de_Saint_Exup%C3%A9ry#perfection https://en.wikiquote.org/wiki/Antoine_de_Saint_Exup%C3%A9ry#...
- azinman2 11y agoWhat you're determining to be "needed" wrt design is very draconian and anti-progress. The web was ugly in 95 and appealed to few... progress in all areas -- especially design -- has made it what it is today.
- currysausage 11y agoI find that the prevalent user-friendly, minimalist design philosophy is very much compatible with performance principles like those that I have outlined. Performance is not the opposite of UX, it is an important part of it.
- srean 11y agoI have been puzzled by this being said about dlang forever and today about HN. These sites are certainly not noticeably slow, but I don't notice anything remarkably fast about them either. Am I not visiting enough of the slow sites ? My working hypothesis is that I don't have a good understanding of web-development to appreciate the nuances. Much akin to me listening to Indian classical music, Jazz: I would often encounter trained listeners breaking out into a (silent) applause. At those instances I feel bad because I realize I have missed something but I wish I didn't. So all pointers appreciated.
- technomancy 11y ago> Am I not visiting enough of the slow sites? Do you use NoScript? I feel the same way because I usually run with JS turned off. Most things are pretty zippy despite using a computer from 2009.
- srean 11y agoAh! that and flashblock might explain it.
- bradleyland 11y agoHow fast is your network link, both in terms of throughput and latency for the sites you visit? The OP is browsing over a 256 kbps connection of unknown origin. They are likely impacted by latency and throughput constraints, which will exacerbate issues with sites that require a lot of requests or are resource heavy. Making a site fast boils down to: 1) Making sure your server responds quickly. 2) Reducing the number of requests required for a page to load. 3) Reducing the number of bytes required for a page to load.
- mootothemax 11y agoWith an empty cache, for me, hacker news loads in ~700ms. Under the same conditions, the dlang site loads in ~200ms. That's half a second faster, which is definitely noticeable when clicking around.
- 11y ago
- Trioxin 11y agoTo some of you who are testing with your browser: Observing load times in your browser is fine for just fun but latency is irrelevant when evaluating the speed we're talking about here. A loading time benchmark of server-side code should naturally be calculated server-side, a server-side measurement of how long it took to execute the backend code. Nobody can accurately benchmark D over the net using their browser. If D is also being used to code the web server, then a browser should be used to benchmark the code but not across the net unless you can somehow subtract your latency. If not, it should be done locally or over a LAN where latency is extremely consistent but probably locally. I always benchmark my sites in this way. As for D being quite fast, the consensus is that yes, it is. From what I gather, you'd be hard-pressed to beat or match it using any other language not counting perhaps assembly. It also seems to have a relatively low memory footprint comparable to that of C and C++. IMO, more people need to be using D. It seems to outperform every other language in every speed benchmark I've seen, is packed with modern features, and doesn't have a steep learning curve. I'm not someone who has a bias toward D either. I've only recently become interested in it and I come from a background of C, C++, and C# (As well as many scripting languages). Try D, I am.
- srean 11y ago> It seems to outperform every other language in every speed benchmark I've seen > It seems to outperform every other language in every speed benchmark I've seen I like D. A lot. But please don't do this. It a) does not help D's popularity (if that is what you are trying to do , b) it makes you look like a troll or makes you look stupid (sorry)
- Trioxin 11y agoI said that because when I lookup the benchmarks, that's what I see. I'm sure if I setup similar benchmarks of my own I'd probably get the same results (Unless the people who posted those that I've seen are lying and for some reason I doubt that). You should think before calling someone a troll or saying that they sound stupid when they're citing information from an outside source. If I didn't think Dlang had a performance benefit I'd have a bit less incentive to use it. Are you saying such benchmarks are false? They seem legitimate to me. Search and view them yourself. If I were a troll I'd do something like you did, citing no evidence. Commenting in such a way without citing data makes YOU sound stupid (Sorry).
- h1fra 11y agoWow quiet fast indeed, in my experience the fastest dynamic site I browse is kickass torrents (=> no link for obvious reason) With cache enabled they both take less than 150ms to render a full page which actually should be a standard but seems really really faster than any sites I visit everyday
- tuyguntn 11y agoWow, really fast, feels like fully loaded single page app and only downloading jsons