3 ms·
You're not wrong, it's just that the time it takes to transfer something across a network is usually slower and a lot less deterministic than processing somethi
by tomphoolery 11y ago
You're not wrong, it's just that the time it takes to transfer something across a network is usually slower and a lot less deterministic than processing something locally on your machine. While I'm pretty sure it takes longer to evaluate more code than less code, I would imagine that the time differential is negligible compared to the time savings you get from gzipping JS/CSS assets for transmission over a network. Otherwise, why would we gzip assets at all?
- yxlx 11y agoParent is not saying not to gzip. They're saying that more js takes more time to parse, regardless of compression. Iow, they are not talking about decompression overhead, they are talking about what happens after decompression.
- mbrock 11y agoIf you're aiming for a really snappy app, and you've made sure everything is fully cached, in a ServiceWorker even for totally instant loading, then JS parse/evaluation time becomes significant.
- collinmanderson 11y agoRight, but you can use caching / service workers to solve the network time, but there's nothing you can do to speed up the initial javascript load time.