4 ms·
Until then, is the additional 25Kb actually hurting your users? Not really. Nor is an extra 30KB font file. Or an additional 50KB for an icon set. Or an ext
by onion2k 5y ago
Until then, is the additional 25Kb actually hurting your users?
Not really.
Nor is an extra 30KB font file.
Or an additional 50KB for an icon set.
Or an extra 18KB for a better select box.
Nor is that 200KB header image.
Why not add that 50KB analytics script too?
The extra 40KB for a nice a animation library is useful.
You need to add 150KB for a UI component library.
And so on, all the way until your page is a 2MB download..
Any individual incremental increase can be justified as part of the page weight, but a few KB here, a few more there, and your site suffers death by a thousand cuts. You have to worry about the extra 25KB here and there if you're going to keep the overall size within a sensible performance budget.
- pier25 5y agoThis. I always go to Bundlephobia before deciding to use an NPM dependency. https://bundlephobia.com/ https://bundlephobia.com/
- niutech 5y agoActually Petite-Vue is 6.4KB gzipped: https://bundlephobia.com/package/petite-vue@0.2.3 https://bundlephobia.com/package/petite-vue@0.2.3, whereas Alpine.js 2 is 8.3KB gzipped: https://bundlephobia.com/package/alpinejs@2.8.2 https://bundlephobia.com/package/alpinejs@2.8.2
- oliwarner 5y agoI absolutely agree with the gross sentiment —CPU time and bandwidth are expenses that should be argued— but your argument omits two key items: developer time and UX benefit. In my case, using full-fat Vue lets me do a swathe of complex stuff, pulling in libraries and components we use elsewhere, that also do piles of complex stuff, and it only takes me a couple of hours to progressively enhance a big form, which makes it nicer for the user with pro-active validation, breaking the thing into a wizard, easy dynamic lookups, etc. My work increases conversions, creams KPIs. Is that worth 30KB? Every day of the week. Can I batter it down to 20KB? Probably, but it'll take me at least twice as long this time, possibly make the work output less reusable and cost the client twice as much. Is that 10KB worth it? Maybe, maybe not. Don't get me wrong, I'm not the sort of person who throws JS everywhere. I'm a Django developer who will always push to SSR over SPAs... But I also realise there is occasionally a business case for a but of reasoned splurging. Again, my hope is that within a couple of years tree-shaking gets good enough to automate this nonsense, trim out everything that isn't used.