Obviously a lot of people worry about performance. I watched a video from phonegap about developing games on a mobile device. What the guy was saying was right, jQuery is slower than
getElementBYId and that jQuery could be overkill. But its still nice to see the numbers behind jQuery rather than just opions.
From my time contracting I met a lot of people, In fact during my small perm jobs (Zone, Independence United) that let me go I realised two things. People are annoying and secondly, which is why they are annoying, they have preconceptions about coding practices that are just plain wrong. But when speaking to them about it its matter of fact for them. There is no discussing, they are disgusted with you for not knowing. I walk away and think,
That’s not right. wtf are they talking about?
But sadly at the time of the argument I don’t have enough knowledge to back up my bumfoundedness in what their thoughts were. Of course I think this more has to do with the individual as if the people aren’t dicks and they know more than you, you discus and learn from them.
Fuck, what was the point of this post? jQuery, its not that bad on a modern mobile 😉
This question gets asked a lot, and I’ve yet to see a data-based exploration of this topic. Terms like “big” and “bloated” are relative terms; they don’t mean anything without numbers to back them up. The real question should be – “Does the size of jQuery adversely affect the users of my applications enough to outweigh the development conveniences that the library provides?”
But my favorite and most obvious quote is here:
There’s Almost Certainly Something Way More Important to the Efficiency of Your Application Than Whether You Use jQuery
According to the HTTP archive the average Web page now
- is over 1.7MB,
- makes over 90 HTTP requests,
- includes over 1MB of images,
- makes only 46% of its resources cacheable.
So before you care about jQuery, first make sure you
- minify your CSS/JS assets,
- concatenate your CSS/JS assets,
- gzip your HTML/CSS/JS assets,
- compress your images,
- set appropriate cache headers,
- remove unnecessary HTTP requests.
Often removing an image or two can improve your performance more than removing jQuery, and is far easier to do. If you have performed all these optimizations, and are still experiencing performance issues on mobile devices, then look into removing libraries like jQuery – just make sure you cover your bases first.
See the article here: Is jQuery Too Big For Mobile?
So, read it understand it and before you start bashing technologies look at the other fucking stuff on your site.