2 ms·
> "It's usually cached" is not an excuse for excessive traffic, It does redefine what "excessive" means though. If 10 independent requests makes the code easie
by BobbyJo 4y ago
> "It's usually cached" is not an excuse for excessive traffic,
It does redefine what "excessive" means though. If 10 independent requests makes the code easier to maintain, an the performance hit is a few Ms on average, I wouldn't consider that excessive. If, under the same circumstances, the performance hit was a few hundred ms, it would indeed be excessive.
It's not making excuses so much as pointing out a potential discordance between what is measured and what is assumed based on that measurement.
- danpalmer 4y agoFurther, 10 requests where 8 can be more aggressively cached, may well be better than 4 requests where none can be cached. Separating out requests isn't just about maintainability, it's also about separating entities with different caching behaviour. We could just do one big request for HTML, but if there's a lot of the page that doesn't need to change, that's wasteful.