Live data from Hacker News

The impact of removing jQuery on our web performance

insidegovuk.blog.gov.uk

241–250 of 283 posts

Re: The impact of removing jQuery on our web performance

#241

Honestly I feel like jQuery is my "secret weapon" similar to how Lisp is Paul Graham's in Beating the Averages. It's so much more productive than vanilla JS with negligible impact on performance, especially with caching.

What are you doing with jQuery that you can't easily do in vanilla JS? I understand the argument before we had querySelector, but not now.

Re: The impact of removing jQuery on our web performance

#243
post #200

Earlier quoted context omitted.

I don’t understand how you can claim that react is pure overhead. Sure it does have overhead, but it’s also a really useful abstraction. How composable abstraction for UI components that enables local reasoning not functionality. jQuery is just pure overhead with no real functionality compared to vanilla js.

React is vastly overused. You don't need every single element in your page to be a separate component when 95% of your site is pure text and you have an occasional form or a button here and there. If you're making an actual application (think Discord/Spotify) then yes, it becomes a necessary abstraction. Your personal website or news website (or many others) using React is a waste of my bandwidth and CPU cycles.

Agreed it doesn’t make sense for a lot of things that could just be static sites. But you also wouldn’t need jQuery on such sites so I’m not sure why that matters.

Re: The impact of removing jQuery on our web performance

#244
post #241

Honestly I feel like jQuery is my "secret weapon" similar to how Lisp is Paul Graham's in Beating the Averages. It's so much more productive than vanilla JS with negligible impact on performance, especially with caching.

What are you doing with jQuery that you can't easily do in vanilla JS? I understand the argument before we had querySelector, but not now.

JQuery is terse, which helps with productivity.

document.getElementById('id').style.display = 'none' vs $('#id').hide();

Re: The impact of removing jQuery on our web performance

#245
post #188
post #154

The team at gov.uk is doing an excellent job regarding web performance, credit where credit is due. In many ways role model behavior. Still, the results are such a stretch as to not have that much meaning. They have to descent all the way to 2G to see any meaningful difference, and I'm assuming they are cold visits (typical in lab-based testing). For those exceptional users, this creates a difference from very poor (…

12 seconds down to 9 seconds is not negligible. What is negligible is 12 down to 11.999 seconds because you prematurely optimized. And even for "normal" users, shaving milliseconds matter. The general idea is that a UI should respond within 100ms to feel instantaneous. More than 1s and you interrupt the flow of thought. According to Google research, increasing page load time from 1s to 3s increases bounce rate by 32%…

Has anyone been able to reproduce this "Google Research" that is so often quoted? They have numbers related to conversion too. I know I'm sounding doubtful but bringing response time down a second or so isn't a magic potion for more money pouring in the door. Not that anyone should ignore performance. It's irresponsible to ignore perf. I just know from experience, when buying something on Black Friday at Amazon, if the page doesn't respond in 2 seconds... you probably are going to wait a bit longer.

Re: The impact of removing jQuery on our web performance

#246

Earlier quoted context omitted.

You can improve website performance by replacing jQuery with vanilla JS. That's a statement of fact, not a "jQuery bashing thoughtpiece". Several years ago, jQuery was practically a requirement, but now vanilla JS offers many of the same features. There's a huge amount of older websites that relied upon jQuery but don't really need it anymore.

Even as someone who's largely ripped out jQuery for vanilla JS I still totally understand why people use the API. Vanilla JS is terse comparative to jQuery short-hand syntax, especially for simple event bindings. Sure, I think jQuery these days is largely legacy developer ergonomics... I admit there are parts of those ergonomics that I miss. Especially when comparing it to modern tool-heavy transpiled/compiled/whatev…

> Vanilla JS is terse comparative to jQuery short-hand syntax, especially for simple event bindings.

You mean "verbose" here, probably?

Re: The impact of removing jQuery on our web performance

#247
post #188

Earlier quoted context omitted.

12 seconds down to 9 seconds is not negligible. What is negligible is 12 down to 11.999 seconds because you prematurely optimized. And even for "normal" users, shaving milliseconds matter. The general idea is that a UI should respond within 100ms to feel instantaneous. More than 1s and you interrupt the flow of thought. According to Google research, increasing page load time from 1s to 3s increases bounce rate by 32%…

Has anyone been able to reproduce this "Google Research" that is so often quoted? They have numbers related to conversion too. I know I'm sounding doubtful but bringing response time down a second or so isn't a magic potion for more money pouring in the door. Not that anyone should ignore performance. It's irresponsible to ignore perf. I just know from experience, when buying something on Black Friday at Amazon, if t…

Google's results consistently don't hold up for high-intent visitors, yeah. A .gov site isn't (overly) concerned about bounce rate - people have no other location to bounce to, they will consistently wait out latency to do what they need to do.

It does still help of course, just at tiny fractions of the impact that Google saw.

Re: The impact of removing jQuery on our web performance

#248

Earlier quoted context omitted.

Quoted post unavailable.

I can't downvote you, and being as dismissive of you as you are of these efforts would simply create more rudeness. Instead, consider why a governmental agency might want to be as inclusive of as many users of its services as possible, and how your miniscule slice of the world, advantaged as it is, might blind you to that motivation.

If you want to help the disadvantaged, don’t kid yourself that removing jquery from your website is doing it.

Re: The impact of removing jQuery on our web performance

#249

Honestly if they'd just used jQuery instead of React all the way through they'd be loading a lot less JS and performance would be vastly better on those slow old devices. After all, jQuery was made for the slow old devices, in the time they were not slow or old. The real problem is that jQuery is not new and shiny, and nobody wants to be doing jQuery in 2022.

In addition to which, jQuery was actual useful - React is just pure overhead with no real functionality.

React's core functionality is to manage the relationship between state and the dom.

jQuery lets you imperatively manipulate the dom.

They're different use cases; calling one useful and the other not isn't a very accurate representation.

Re: The impact of removing jQuery on our web performance

#250
post #188

Earlier quoted context omitted.

12 seconds down to 9 seconds is not negligible. What is negligible is 12 down to 11.999 seconds because you prematurely optimized. And even for "normal" users, shaving milliseconds matter. The general idea is that a UI should respond within 100ms to feel instantaneous. More than 1s and you interrupt the flow of thought. According to Google research, increasing page load time from 1s to 3s increases bounce rate by 32%…

> Performance matters, a lot. Developers really don't care. They will claim otherwise with great conviction, but its all posturing and bullshit. If developers did care they would measure everything and challenge popular assumptions. Instead most developers want to randomly guess at what works and instead talk about tools. That's why most pages will never come close to being vaguely fast. 9 seconds is still really slo…

[deleted]
Post reply on HN