4 ms·
in the world of web performance and SEO 85kb is very significant. i wouldnt think twice to remove it if i had the opportunity. compared to modern frameworks, jq
by alejandromaka 8y ago
in the world of web performance and SEO 85kb is very significant. i wouldnt think twice to remove it if i had the opportunity. compared to modern frameworks, jquery is ~500% larger. you could definitely debate the usage and needs but thats a separate topic than efficiency.
- munk-a 8y agoUh, at least in terms of react a bit of quick googling saw people who were putting effort into optimizing react's client side size getting it down to ~40 - 90 kB, so it seems pretty comparable. Some of these folks had a 1.2 MB script bundle they were sending to the client to begin with. I'm not in the trenches with this stuff though so my numbers may be wrong but... the ~500% number seems pretty off.
- _oxih 8y agohttps://gist.github.com/Restuta/cda69e50a853aa64912d https://gist.github.com/Restuta/cda69e50a853aa64912d react is 31kb vue is 20kb preact is 4kb. depends on the framework but 500% isnt far off
- deleted 8y ago[deleted]
- Carpetsmoker 8y agoThe standard download of Vue.js is 95k; React is 120k. I have no idea where you got your "500%" from, but it seems wildly off-mark.
- alejandromaka 8y agohttps://gist.github.com/Restuta/cda69e50a853aa64912d https://gist.github.com/Restuta/cda69e50a853aa64912d react is 31kb vue is 20kb preact is 4kb
- mynameisvlad 8y agoJQuery Minified and GZipped is also 30KB: https://mathiasbynens.be/demo/jquery-size https://mathiasbynens.be/demo/jquery-size When doing comparisons, don't be disingenuous. Compare like numbers.
- Carpetsmoker 8y agoPlus Vue.js 2.6.6 is 91K, not the 63K of 2.0.3 in that comparison. It's easy to "win" internet arguments like this rolls eyes.
- alejandromaka 8y agowhoops i assumed the 85k was already gzipped. fair enough
- acdha 8y agoThese massive compressed JS bundles make me think your numbers are off on the alleged golden age of modern frameworks: https://webpagetest.org/result/190213_XH_63c61dc3d45cb95ec8ac7db079372ae6/1/breakdown/ https://webpagetest.org/result/190213_XH_63c61dc3d45cb95ec8a... https://www.webpagetest.org/result/190213_NX_ee1e7ae8fa74557d70b7acadd8ce3b68/1/breakdown/ https://www.webpagetest.org/result/190213_NX_ee1e7ae8fa74557... It’s not hard to beat jQuery in many cases but they’re looking pretty svelte in comparison: https://webpagetest.org/result/190213_93_e2da91a07e2b2bc02345b086bf349bb5/1/breakdown/ https://webpagetest.org/result/190213_93_e2da91a07e2b2bc0234...
- sureaboutthis 8y agoJust because others do bad things doesn't make it OK for you to do bad things. The biggest complain I read about is javascript downloads being so big nowadays so piling on with jQuery--or anything else--just because frameworks and other libraries are so bloated doesn't make it OK.
- acdha 8y agoLook, I’ve replaced plenty of jQuery with vanilla JS. I’m totally on board for lighter, leaner pages. My point was simply that there’s this tedious cycle where people crap on the older tools and say everything is better across the board with the current hotness without actually measuring anything. There are a lot of cool capabilities we can use now but they’re only going to be better at the things you actually measure & attempt to improve. If you don’t profile your app, that cool new stack is probably going to be bigger and slower because tools like webpack make it easy to manage tons of code and you won’t notice until you test it on mobile, slow WiFi, etc.
- sureaboutthis 8y agoThe "cool new stack", in this case, is native, vanilla javascript that works everywhere without downloading anything and without a need to learn someone else's library.