7 ms·
Why? I was recently talking at a conference and got in an argument with another speaker (not publicly) because he had a technique to improve API response time.
by throwaway2016a 10y ago
Why?
I was recently talking at a conference and got in an argument with another speaker (not publicly) because he had a technique to improve API response time. Thing is, said technique would delay the time to market on the product and make the code needlessly complicated to maintain. And I pointed out, that it is probably better for the bottom line of most companies to do the way that is slightly slower but easier to maintain and faster to get to market.
At which point he accused me of being another product shill (not a real software engineer) and shut down the debate.
Thing is, I have a computer science degree and take software engineering very seriously. I just also understand that companies have a bottom like and sometimes good is good enough.
So I ask, this "world's fastest web site"... how much did it cost to develop in time/money? How long is the return on investment? And is it going to be more successful because it is faster? Is it maintainable.
I'm guessing the answers are: too much, never, no and no.
With that said, I fully appreciate making thing fast as a challenge. If his goal was to challenge himself like some sort of game where beating the benchmarks is the only way to win. Then kudos. I love doing stuff just to show I can just as much as the next person.
- Veratyr 10y agoIn this case you're probably right but in general, latency can make a big impact on profit and revenue. For example Marissa Mayer claimed (though this was in 2006) that a 500ms delay directly caused a 20% drop in traffic and revenue: https://glinden.blogspot.com/2006/11/marissa-mayer-at-web-20.html https://glinden.blogspot.com/2006/11/marissa-mayer-at-web-20... Optimizely found that for The Telegraph, adding a 4s delay led to a 10% drop in pageviews: https://blog.optimizely.com/2016/07/13/how-does-page-load-time-impact-engagement/ https://blog.optimizely.com/2016/07/13/how-does-page-load-ti... 100ms cost Amazon 1% of sales: http://blog.gigaspaces.com/amazon-found-every-100ms-of-latency-cost-them-1-in-sales/ http://blog.gigaspaces.com/amazon-found-every-100ms-of-laten... Akamai has a number of claims: https://www.akamai.com/us/en/about/news/press/2009-press/akamai-reveals-2-seconds-as-the-new-threshold-of-acceptability-for-ecommerce-web-page-response-times.jsp https://www.akamai.com/us/en/about/news/press/2009-press/aka... Of course the impact of latency is going to depend on your particular circumstances but there are certainly circumstances where it can make a big impact.
- ci5er 10y agoI wonder if Amazon has done other/more research since and softened their stance since that gigaspaces article... ... because I'm noticing, esp. over the last 1+ years, that Amazon's page loads are getting slower and slower (Win7, FF) with all of the "crud" they are loading with each/every page. I remember when it was all a lot snappier (not like an HN page load "snappy", but pretty good!)
- rajacombinator 10y agoYep they sure put a lot of crap on their clunky pages. They could do much better but they don't seem to care.
- itsbits 10y agomy observation is Amazon hardly cares about web page performance..
- _Codemonkeyism 10y agoThe 'fast' is not increasing revenue by itself I think. Faster pages => more products seen by user => higher likelihood they buy something. Amazon has shifted since then to pushing more products into your face, which looks like for them works better than the 'faster pages' approach.
- chrismorgan 10y agoGoogle: 2006. Amazon: 2006. Akamai: 2009. At least the Optimizely result is from this year. I really want more evidence of the importance of performance in web systems (to justify my hobby, if for no other reason), but things from ten years ago just don’t cut it. Can we please stop citing articles from ten years ago and cite some studies that aren’t more than two years old? Do people have more such studies? (Also I’d be interested in more geographically diverse results. Figures like “three seconds to abandonment” are absurd when you’re in Australia or India as I am. Most e-commerce sites—especially US/international ones—haven’t even started drawing at that point, even with the best Internet connectivity and computer performance available, simply because of latency if the site is hosted in the US only. I visited the US a couple of years ago and was amazed at just how fast the Internet was, simply due to reduced latency.)
- MaulingMonkey 10y ago> And is it going to be more successful because it is faster? There's a lot of research out there about the link between page performance and user retention rate. And this makes sense: If newegg is taking forever to browse, I'll switch to amazon and newegg loses out on a decent chunk of change. https://research.googleblog.com/2009/06/speed-matters.html https://research.googleblog.com/2009/06/speed-matters.html So, up to a point, yes, yes they are going to be more successful because it is faster. 200ms on my broadband connected desktop isn't that much, but Google is able to measure it's impact. And that might be a second or two on my cellular connected phone. > Is it maintainable. A lot of optimizations I've seen involve simplifying stuff. Fast and maintainable don't have to be at odds. I wouldn't care to guess for the whole, but, for example, do you really think using system fonts instead of embedding your own is more complicated, harder to maintain, and more work? I doubt it, and that's one of the optimizations suggested. Now, yes, with optimizing, there is a break even point where it's no longer worth it to push further, but it's also not necessarily obvious where that is if you're just taking it a task at a time. Keep in mind: some of this is research for effective and ineffective techniques for optimizing other websites, and evaluating which ones are maintainable (or not) for future projects. To know what to bother with and what not to bother with when implementing the rest of the codebase. If you're just worried about the next JIRA milestone, you'll be sacrificing long term gains for short term metrics. Is it worth micro-optimizing everything before launch? Probably not. Is it worth testing out what techniques and technologies perform well enough before launch? I've been part of the mad scramble to do some major overhauls to optimize things that were unshippably slow before launch. Building it out right the first time would've saved us a lot of effort. I'd say "probably yes."
- andmarios 10y agoAn engineer's job is to solve a problem within real world restrictions. Cost, implementation time, maintainability are all parts of the equation an engineer has to solve. Your approach was correct. Ideally you would take into account how response time affects a site's metrics and try to balance between all constraints.
- pasta 10y agoYou were right if it would take a lot of resourses to make things fast. But most of the time it doesn't. I made a lot of sites fast(er) in maybe 4 hours time. Yes, slow frameworks are slow so you cannot change that in 4 hours time. But most frameworks arent that slow. My work involved: rewriting a slow query used on every page, changing PNGs to JPEG and reducing the resolution, moving an event that is fired on every DOM redraw, and so on. And every single time I was just fixing someone's lazy programming. Ofcourse I agree that there should be a limit to optimizations, but most of the time simple fixes will reduce seconds.
- jnbiche 10y ago> And every single time I was just fixing someone's lazy programming. Often, the kinds of mistakes you mention are not due to laziness, but instead to ignorance. Many web developers come from a graphic design or old school "webmaster" background and some never really mastered programming as a skill. They're comfortable writing and/or copy-pasting small scripts using jQuery or some favorite library for minor enhancements to a page, but struggle when it comes to building a cohesive, performant, well-designed application for the front-end. I myself was a member of this group until about 2007-2008, when I made a concerted effort to upgrade my programming skills. I did intensive self-study of algorithms, data structures, low-level programming, functional programming, SICP (most of it) and K&R C (all of it), etc. More recently, Coursera and EdX have been a great resource for me to continue to advance for software development skills.
- jakobegger 10y agoWhy? Because mobile. An acceptable 2s load time on Wifi might turn into 2 minutes on Edge. You might say, 95% of our customers have 3G, to which I'll reply, 100% of your customers sometimes don't have 3G. And when your page takes a minute to load, it doesn't matter what your time to market was, because noone will look at it. When your news website is sluggish every time I'm on the train, I'll stop reading it, and do something else, like browse hacker news, which is always fast.
- NicoJuicy 10y agoI wouldn't know what to do to make a page load a minute. Overengineering is the biggest problem to finish a product fast. Fix problems when they are coming and try to foresee problems, as long as it doesn't take 2 times as long to finish
- jakobegger 10y agoHave you never tried to browse the internet on a crowded hotel wifi, or on a train, or in the mountains? When you have network latencies measured in seconds and a bandwith of a few KB, one minute page load times are nothing special. Most people just give up in those cases and think they have no signal. But it's not true: That bandwidth would be absolutely sufficient to transfer a few tweets or a newspaper article. It's just the bloated ad-tech infested websites used to serve the content that are breaking down.
- majewsky 10y agoExactly. I'm at my parents' house, where there is only EDGE, and only if the wind goes in the right direction. :) The supposedly "fastest web page" took 13 seconds to download and render, and that's really good compared to the rest. HN is slightly faster, but probably due to cached assets.
- rms_returns 10y agoWhy? Because its all about making compromises to manage an app and achieve its goals. You are right about the time to market and launching the product sooner should be the number one priority. But of all the factors that make your product worthwhile, performance is a pretty darn good factor. There are several websites today on the internet who have the potential to become great, if only they pay some heed to the performance factor. Take the Upwork freelancing site for example, its performance was really solid when it was oDesk, its predecessor. Its basically, because of the earlier oDesk goodwill that it still even has a sizable userbase today. Sometime in 2013, along the lines of your thinking, some management guru must have cut corners in development of the repolished upwork site, and the result was an absolute performance nightmare! As a freelancer, Upwork is a third or fourth priority for me now, whereas the former oDesk was actually number one. Another example of a nightmarish performance is Quora - it has a fantastic readership that supplies solid content to the site. Its a solid proof that really good content is so much valued in the online world - that despite its lagging performance, people are willing to endure a site with good content, but that doesn't mean its ideal. Quora still has a lot of potential, it can match or maybe even surpass the levels of Reddit and HN, or even Facebook and Linkedin if they pay heed to the performance factor, but I don't see that happening soon!
- iagooar 10y agoLet's imagine for a while, that an engineer is designing a bridge, or an architect a new building. The companies that pay for them are in a hurry and want to cut costs as much as any other. Do you think it would be an ethical thing to build a less secure bridge or building just for the sake of getting them out quicker and/or cheaper? So this is how I see it with software engineering. Of all the engineering branches, we take our job the least serious and are not good at defending our decisions or taking the required time to build our software the way it should be. We just assume that our customers know better and have better reasons to get out to the market and that there is nothing we, as software engineers, can do about it. So in a way, that guy you talked to was kind of right, because it is your responsibility to defend the need of fast, efficient and maintainable software. It is the customer's responsibility to take care of the product and plan accordingly.
- IanCal 10y ago> Do you think it would be an ethical thing to build a less secure bridge or building just for the sake of getting them out quicker and/or cheaper? Yes, and we do this constantly. Nothing is ever designed to be completely safe because we'd never get anything done. Bridges aren't all designed to withstand magnitude 11 earthquakes. We arguably go too far because the costs of the final safety features could save far more lives if used for something like vaccinations, but that's not key here. As always, the trick is where you draw the line.
- NicoJuicy 10y agoWhen a bridge collapses, people could die and it would take weeks or months to rebuild. When your app fails due to some reason, you can fix it sometimes under the 3 minutes. Azure, amazon, Google all have status pages. A bridge doesn't.
- falcolas 10y agoThree minutes of Amazon being down is measured in the millions of dollars lost. People's careers (or businesses) are destroyed over such numbers.
- _Codemonkeyism 10y agoI consider developers senior if they can make trade offs between technology and business.
- dansingerman 10y agoExactly. It's not like performance is or is not important. It's about the trade-off given the detail and the context.
- Shorel 10y agoI think performance is one of the reasons, if not the main reason why WhatsApp is the leading mobile chat application. They can manage more millions of messages per second than all their competitors. The 'build slower applications much faster' mantra has some value, except when everyone can build that application in a month and the market is full of clones.