7 ms·
If the 3x slowdown from the infrastructure were eliminated, each round-trip-time being 3x faster would affect all the protocols above, and we could immediately
by Lagged2Death 9y ago
If the 3x slowdown from the infrastructure were eliminated, each round-trip-time being 3x faster would affect all the protocols above, and we could immediately cut the latency inflation from ~37x to around 10x, without any protocol modifications.
The page this article is published on makes 87 separate network requests to 19 different domains. Even with a great deal of the content cached, it takes 7 seconds to reload over my WiFi today. This is because I'm using an ad blocker; without one, the page makes more requests to more domains and transfers more stuff, slower.
It seems likely that cutting bloat would have a much bigger impact on responsiveness than infrastructure upgrades. Cutting bloat would produce benefits even (especially) in times and places where signals or infrastructure are marginal. Cutting bloat could mean your old phone or tablet computer could browse the web tolerably instead of ending up in a landfill. Cutting bloat from a website today produces a benefit, for all visitors, worldwide, today. Improving infrastructure may be a good investment, but cutting bloat is a force multiplier.
The responsiveness of the web has been adjusted to optimize the number of eyeballs that see ads. If a site is too sluggish, people leave, but a site that's too fast is leaving money on the table. How many advertising, tracking, and affiliate domains would a web page like this connect to, if latency were cut by two thirds?
- thinkloop 9y agoAs much as ads are annoying, this has nothing to do with the article. One man's bloat is another man's content. No need for this nag to be top comment on HN for an article about why data isn't moving at the speed of light.
- Hoshea 9y agoHe's not making an argument for the elimination of ads, bloat comes in so many different forms. Loading entire libraries to solve trivial tasks, dragging in massive images where they don't belong, etc.
- true_religion 9y agoThey don't need to cut advertisements. Certainly, they could have as many as 10 advertisements, and only make requests to two domains---the ad network, and their own domain. Their page has a high number of requests primarily because they do not bundle their javascript, CSS, or icons. I see 95 requests that I see without adblocking, and about 20 of those requests are javascript coming out of their own WordPress instance. They're using 2 different full icon libraries and adding at least 5 more icons not contained in either.
- zeta0134 9y agoI think a large contributor to this trend is a side effect of JavaScript, which is to perform library inclusion at runtime inside the browser. Think about it. If you include a gigantic library in a compiled language, but only use 3 of its features, the rest of the library doesn't make it into your final program. Only those three features that you used do, because that's the linker's job. It takes only the features of a given library that are actually used for space efficiency reasons, and removed anything unneeded. This is possible for JavaScript, but common language usage patterns work against this goal. If you're going to use a clientside library that's fine, but you should ship only the small fraction of it that your code actually calls into, not the entire honking library, 90% of which goes untouched by the client for every user. Point here is, I agree with you, but this is a difficult problem to solve. You're asking a large number of frankly inexperienced programmers to deviate heavily from most JavaScript tutorials, and worse, most example code included in the documentation of most large frameworks.
- jdmichal 9y agoThat's standard dead code elimination, and that's only true in static linking. Dynamic linking, which is far more popular, will load the entire library into memory. And then you get interesting hybrids like Java, where libraries are dynamically linked but only the classes that are actually used are loaded. [0] The equivalent for dynamic languages is tree shaking, and is a harder or impossible problem depending on the language. When you can do something like the following in JavaScript, how do you determine what's dead or alive? var fn = document.getElementById("function").value; var input = document.getElementById("input").value; var output = functions[fn](input); document.getElementById("output").value = output; [0] EDIT: But all the method and fields within a class are loaded, regardless of whether they are used. Which is why I called it a hybrid.
- Spivak 9y agoLanguage theory question: In the case of JS is there a safe, but still useful, subset of the language where dead code elimination could be improved? Ignore if it can be detected or not, we'll pretend that the author has to certify that they followed your subset and didn't do X, Y, or Z. If they disobeyed your rules then all bets are off and the result is undefined.
- 13of40 9y agoI agree - both problems can be improved independently of each other. I think "bloat" is less solvable centrally, though, and maybe just the natural consequence of making software more reusable and componentized.
- rthomas6 9y agoIt's not ads! Jquery.com, bootstrapcdn.com, cloudfare.com, cloudfront.net, google-analytics.com, fontawesome.com, Wordpress, Twitter, Facebook, Pocket, rating-widget.com, and typography.com are all used to put the content on this website, and none of them are ads.
- ouid 9y agobut this comment was
- rthomas6 9y agoBuddy I hate all that shit. I use uMatrix and block as much as I can while still seeing the real content. In fact that's how I know what the domains are.
- mhkool 9y agoI work for a company that produces a URL filter and in our experience ads and all tracking javascript is 30+% of all URLs. The code in tracking scripts varies between "short and elegant" to "massive and slow code". There is also a piece of json where the tracker thinks it is necessary to call 10 other trackers: See for example http://ib.adnxs.com/async_usersync?cbfn=AN_async_load http://ib.adnxs.com/async_usersync?cbfn=AN_async_load : AN_async_load([ {"url":"http://cm.g.doubleclick.net/pixel?google_nid=appnexus&google_cm&google_sc&uid=xxxx" http://cm.g.doubleclick.net/pixel?google_nid=appnexus&google..., "tagtype":"img"}, {"url":"https://ib.adnxs.com/getuid?https%3A%2F%2Fcm.g.doubleclick.net%2Fpixel%3Fgoogle_nid%3Dappnexus1%26google_sc%26google_hm%3D%24%7BBASE64_UID_ENC%7D%26google_cm" https://ib.adnxs.com/getuid?https%3A%2F%2Fcm.g.doubleclick.n..., "tagtype":"img"}, {"url":"http://c.bing.com/c.gif?anx_uid=xxxx&Red3=MSAN_pd" http://c.bing.com/c.gif?anx_uid=xxxx&Red3=MSAN_pd", "tagtype":"iframe"}, {"url":"http://odr.mookie1.com/t/v2/sync?tagid=V2_4265&src.visitorId=xxxx" http://odr.mookie1.com/t/v2/sync?tagid=V2_4265&src.visitorId..., "tagtype":"img"}, {"url":"http://match.adsrvr.org/track/cmf/generic?ttd_pid=appnexus&ttd_tpi=1&ttd_puid=xxxx" http://match.adsrvr.org/track/cmf/generic?ttd_pid=appnexus&t..., "tagtype":"img"}, {"url":"http://pixel.rubiconproject.com/tap.php?v=4894&nid=1986&put=xxxx" http://pixel.rubiconproject.com/tap.php?v=4894&nid=1986&put=..., "tagtype":"img"}, {"url":"http://sync.mathtag.com/sync/img?mt_exid=13&mt_exuid=xxxx&redir=http%3A%2F%2Fib.adnxs.com%2Fsetuid%3Fentity%3D8%26code%3D%5Buuid%5D" http://sync.mathtag.com/sync/img?mt_exid=13&mt_exuid=xxxx&re..., "tagtype":"img"} , {"url":"http://p.rfihub.com/cm?in=1&pub=345&userid=xxxx" http://p.rfihub.com/cm?in=1&pub=345&userid=xxxx", "tagtype":"img"}, {"url":"http://t.mookie1.com/rsp?dnv=[TIMESTAMP]&rurl=//ib.adnxs.com/mapuid?member=xxxx%26user=[xxxx]" http://t.mookie1.com/rsp?dnv=[TIMESTAMP]&rurl=//ib.adnxs.com..., "tagtype":"img"}, {"url":"http://t.wayfair.com/a/vendor_sync/user?vendor_id=1&uid=xxxx&t=1" http://t.wayfair.com/a/vendor_sync/user?vendor_id=1&uid=xxxx..., "tagtype":"img"} ]); The slowness that we experience is from delays caused by calling scripts that call scripts that call scripts, processing large pieces of javascript and network latencies. edit: and server latencies.
- bo1024 9y agoI disagree. The article claims that latency is a problem because, as a main example, users dislike slow page load times (citing Google and Bing). So it a very fair response that we can have a much bigger impact of user-perceived latency by reducing the number of requests our pages make and the size of the page.
- deleted 9y ago[deleted]
- samstave 9y agoWhat has always pissed me off is the global bandwidth overhead that ads have while not reducing the actual cost of connectivity to the average internet customer. What percentage of my cellular data-consumption is specifically ads? I need an app that tracks all data connections and tells me what percent went to which advertisers and a mechanism to block them or bill them to subsidize the cellular bill I pay for data, but that payment has a sizeable chuck allocated to my device displaying their ads. Does anyone not recall the impetus behind the original paid cable tv model was that "you pay for the content of cable TV, thus we won't show you commercials" The. They found out they could say "fuck you" to consumers, play commercials, hike up rates and also take in billions of government subsidies for infra upgrades that were never performed. And companies wonder why some people want vigilante justice on such companies.
- haldean 9y agoThis took me a total of 5 minutes: http://static.haldean.org/why-is-the-internet-slow.html http://static.haldean.org/why-is-the-internet-slow.html The page is 2.3kB on the wire, and the single other request it makes (for the image) adds another 70kB. Taken together, this is a two-order-of-magnitude decrease in page size, with exactly the same content. Every byte is sacred! This webpage infuriates me.
- zepolen 9y agoYour 68kb png infuriates me when it can be compressed to 28kb.
- haldean 9y agoWhile keeping it a PNG? I hit that thing with pngcrush and scaled it to half the size of the original article: what's your magic to get it down to 28k?
- slf 9y agoYou can use lossy PNG compression (palletizing) since it's 'just' a graph. There are seven different colors in it that all alias to white. Convert it to a 32 color 8-bit version and it looks identical. Then use ImageOptim (or like) to compress it down to less than 16 KiB.
- haldean 9y agoNeat, it's 12kB now: convert -colors 16 Ilker_fast.png Ilker_tiny.png pngcrush Ilker_tiny.png Ilker_out.png Total page weight is now 15kB, 0.2% the size of the original page. Incidentally, that ratio is about the same as the ratio between the original page and the entirety of the game Overwatch.
- ChoGGi 9y agoYou can shave 1kB off that png with advpng -4 -z -i 15 http://www.advancemame.it/doc-advpng.html http://www.advancemame.it/doc-advpng.html
- deleted 9y ago[deleted]
- splittingTimes 9y agoIts called "The website obesity crisis" http://www.webdirections.org/blog/the-website-obesity-crisis/ http://www.webdirections.org/blog/the-website-obesity-crisis...
- majewsky 9y agoSince we're talking about saving bandwidth, here's the text+slides version of that talk: http://idlewords.com/talks/website_obesity.htm http://idlewords.com/talks/website_obesity.htm
- f4rker 9y agoI loaded a page the other day that took several minutes to load, over 2,000 connections and constantly rising, and over 20mb. Just to open the home page and then sit there.
- davidf18 9y agoI'm on a 6 ms ping to www.google.com, 315 Mbit/sec dl, 245 ul and it took about 3.5 sec. Using ublock origin, Ghostery on Safari with 2015 MacBook Pro 15"
- sliverstorm 9y agoI agree website bloat is a big problem, but I'm too excited to hear someone talking seriously about latency to care. For years all I've wanted is, say, 6Mbps & 5ms ping, but nearly everyone seems to focus on bandwidth. It might lead to more ads on webpages. But it would also dramatically improve VPN and all "realtime" apps, i.e. VoIP, Skype, remote desktop, sometimes ssh, etc.
- the_cat_kittles 9y agoyea totally agree. its not hard to make something fast on the web. its just usually that its way easier to throw the kitchen sink at the problem.
- CyberDildonics 9y agoThis is irrelevant and a completely different problem.