33 ms·
>Performance obsessed >zero jQuery Perhaps I've not been keeping up with the latest JavaScript news but is jQuery considered slow? jQuery 2 is a lot lighter a
by ancarda 13y ago
>Performance obsessed
>zero jQuery
Perhaps I've not been keeping up with the latest JavaScript news but is jQuery considered slow? jQuery 2 is a lot lighter and works well on mobiles.
- Cthulhu_ 13y agoWell, according to small tests, jquery's selectors are slower than the 'native' selectors; findElementById for example is at least twice as fast as jquery's $('#someId') call. But that's because jquery has to parse the query first. It's a productivity versus performance thing, really. Native JS is often faster than the same thing in jquery.
- domrdy 13y agoHere's a relevant test: http://jsperf.com/queryselectorall-vs-jquery-jb http://jsperf.com/queryselectorall-vs-jquery-jb
- ds_ 13y agoAngular people try to avoid the extra dependency whenever possible, as most things can be accomplished with jqLite. Beginners often use jQuery when there is a 'more angular way'.
- adamdbradley 13y agoYou could still include jQuery in your app if you wanted to. However, the Ionic framework itself does not run on top of that extra layer, especially when native javascript and hardware accelerated CSS transitions will be faster.
- coderzach 13y agoIt sometimes work well on mobile. I think the best approach is to build it in jQuery, if it doesn't perform well, figure out what's slow and replace it with pure DOM. This generally results in replacing some jQuery calls in methods that get called a lot, e.g. touchmove, requestAnimationFrame, etc.
- somethingnew 13y agoAs a funny relevant aside http://vanilla-js.com/ http://vanilla-js.com/