Hacker News new | ask | show | jobs
by wyoung2 2841 days ago
Here are some relevant test results which are about 4.5 years old now:

https://modernweb.com/is-jquery-too-big-for-mobile/

At the time, your 3 round trips would have cost about a full second, which is roughly the same as the worst case JITting time for jQuery in those same tests. That worst-case result was on a slow Android 2 device.

Cellular network speeds have gone up, but certainly not as much as mobile processor speeds, so if you re-did those tests today with modern networks and devices, it’s probably a net benefit to pull the jQuery once, then JIT it on each page load, as compared to making even a single extra round-trip per page load.

> Processors aren’t getting any faster.

That’s true on the server side as well.

The article talks about externalized costs, but if you just shift the computing burden to the server, how do you pay for that?

You could load the page with more ads, which eats up the network bandwidth and JIT savings you just bought by moving the processing to the server.

Or, you could charge the users more than you currently do, which is economically little different than shifting the computing burden to the users, implicitly requiring them to buy faster mobile devices and better mobile data plans.

Consider also that the number of bugs created per line of code is roughly constant for each pairing of developer and programming language, so who pays for the costs of the extra bugs you’d expect to find in 2-3x more LOC?

TANSTAAFL.

> JS-heavy pages I've seen tend to have load times measured in seconds.

I doubt you’re comparing apples to apples.

There certainly are many very fat JS-heavy pages on the Internet, but what’s your comparison? If the JS-light alternatives aren’t accomplishing the same ends, then it’s not a fair comparison. You can’t compare, for instance, a web IRC gateway app to Facebook, even though you can use both to transmit plain text to another person.

Not that I’m defending Facebook. I’m just pointing out that they’ve got a wholly different thing going on there than the IRC gateway.