Live data from Hacker News

The web sucks if you have a slow connection

danluu.com

281–290 of 622 posts

Re: The web sucks if you have a slow connection

#281

Earlier quoted context omitted.

Text articles are probably the most widespread type of content on the web. Most web sites are not web apps. But many developers want to re-construct web sites into web app architectures even when there's no benefit to the end user. I posted the links below on a previous discussion about AMP. They are two examples of basic, javascript-free web pages with text content. There's about 2500+ words on these test pages, but…

Version B could probably be optimized here by not loading two very similar fonts. You can also try loading the font locally first, to avoid the download if it's installed on the user's system. Finally, unicode-range lets you avoid the download completely if that character isn't included on the page. Not a likely outcome on an English page, but a good practice regardless. Webfonts are tough to optimize, but not imposs…

Thanks for trying out these test pages.

Version B has two different font weights from the same family: Regular and Medium/Semi-bold. Version A relies on the fonts already installed on the user's computer.

Dropping the semi-bold font weight would save approx 23k, but having a regular and bold font weight felt like the minimal styles needed to support the page.

Dropping the header image would save 40k. (Note: the header image hasn't been optimised using something like the HTML srcset attribute which can load different picture sizes for different devices).

Re: The web sucks if you have a slow connection

#282
post #249

Earlier quoted context omitted.

You needed about a 100mhz CPU to playback mp3s without skipping. Seemed to hold both on my PPC mac and pentium windows machine.

I used a Pentium at 133 MHz at the time, and it struggled to play MP3. The tracks would stutter.

My intel box may have been a 166Mhz machine. Either way this assumed you weren't trying to do anything else. The PPC mac was definitely 100mhz though - maybe Apple marketing wasn't a lying about perf/clock back in those days.

Re: The web sucks if you have a slow connection

#284

Earlier quoted context omitted.

> which has a JS runtime taking several minutes to load on 2G source? the entire goal of AMP is to load pages quickly

Well, it would have to be downloaded once. It'd stay cached after that though so it's not really a concern. They use version numbers for cache busting.

On mobile cache sizes are very limited, and with the size of modern web pages it has to get reclaimed regularly. You can't rely on caching to solve poor performance.

Re: The web sucks if you have a slow connection

#285

Earlier quoted context omitted.

There is a proposed API for that. https://wicg.github.io/netinfo/ And like most such APIs, it has been kicked around for a long time and it has only been adopted by Chromium on Android, ChromeOS and iOS. It'd be great if it were more widely adopted...

Yay, more browser fingerprinting data points!

Well, to be fair, as the spec notes, you can already fingerprint on speed by timing how long an AJAX call takes.

Also, "on a shit home DSL connection" doesn't really distinguish me from millions of other UK residents.

Re: The web sucks if you have a slow connection

#286

Earlier quoted context omitted.

One wonders how a user that takes 2 minutes to load 98KB is actually able to watch a video. Even by the most optimistic estimations, a video that is a few minutes long at 480p will weigh in at 10 megabytes, meaning it'll take them OVER 3 HOURS to download the entire thing. You would probably be able to browse (slowly), read comments, but not actually do much else.

if you have that kind of speed you watch Youtube in 144p !

I have done that many times and it's doable for most things that don't have hard-coded subs.

Re: The web sucks if you have a slow connection

#287
post #39

Something that sticks out looking at the table. How can some sites simply FAIL loading? I mean, there is something inherently wrong with our web today, where if my internet is very slow and _could_ load a page in 80 seconds if I just leave it like that, the server itself could have configured the timeout to be 60 seconds. So I can never load the page?! The assumption is here that both points of the connection is base…

Open connections take system resources. One way to DOS a website is to open a ton of connections and just sit on them. If the server allows extra long timeouts as long as some bits come in occasionally, then the attacker can send bits occasionally. It's a tricky problem. It might work to allow long turnouts as long as you don't have an ongoing DOS attack, but that sort of thing is hard to configure and test.

After Slowloris and other attacks, this is pretty much a solved problem. Minimise per connection memory, limit connections per IP, drop connections which don't finish the request in X seconds, and separate your app server from your front proxy. And for the front proxy, don't block on reads - do minimal event loop until you can dispatch the full request.

Re: The web sucks if you have a slow connection

#288
post #74

>When I was at Google, someone told me a story about a time that “they” completed a big optimization push only to find that measured page load times increased. When they dug into the data, they found that the reason load times had increased was that they got a lot more traffic from Africa after doing the optimizations. The team’s product went from being unusable for people with slow connections to usable, which cause…

Funny anecdote about the freeway system of southern California. When they were initially planning the system in 1930s, 40s, they were planning to have the system in use for next 100 years. So they built over sized roads (like 10 lane freeway, without having to stop for traffic lights, that go THROUGH center of a major city). When the system proved so car friendly, more and more people moved in and bought cars. Within…

One way to plan for the next 100 years when building roads but not cause people to buy cars is to have a 10-lane wide verge on one side of the road. Have a row of 30-storey buildings on one side of a 5 lanes each way road, but on the other side the buildings are all set back at least a 10-lane width which is used for car parking, 1-storey buildings, public spaces, etc.

If there's ever a need to widen the road, it can be done without demolishing any tall buildings. I see this in new road layouts in China all the time. Of course, under the road will be a new subway system -- another disincentive for people to buy cars.

Re: The web sucks if you have a slow connection

#289
post #203

Earlier quoted context omitted.

> almost no one would do the same for a video of dubious quality and content, certainly not in the 90s. Umm. Porn?

RealPlayer video rips of my favorite TV shows for me, all in wonderful 160p!

A year or two ago, I went through some old files that had somehow followed me all through highschool. Among them were a handful of music and video files I got from friends passing around burned CDs. I was quite amused to play some random episode of Dragonball Z and have it pop up a postage-stamp sized video on my relatively high-res modern screen!

Re: The web sucks if you have a slow connection

#290

Earlier quoted context omitted.

It's what makes me wish designers and developers would work with artificial constraints. Sure, it's easy to design and develop without really thinking of bandwidth constraints, but reality is you are and will always be a better developer and designer by setting artificial bandwidth constraints in your mind and choices. Seeking out or thinking as though you have bandwidth constraints can push you to find better soluti…

I say this so much that I should probably just copy/paste it in the future but... I used to work at a place that had a that , it needed to be optimized. I wish more places would test this way. Your sight may work fine in downtown SF, but that doesn't mean it's going to work well anywhere else.

Databases too. Hosting the database on a fast machine with a lot of RAM and an SSD will hide performance problems that should be immediately apparent.
Post reply on HN