2 ms·
I think the article holds equally well for clients and servers of all kind (web or otherwise). I guess you are alluding to the special case of single-page web
by wongarsu 10y ago
I think the article holds equally well for clients and servers of all kind (web or otherwise).
I guess you are alluding to the special case of single-page web applications prefetching resources at startup? Here the article also holds true: if you can you make your dependencies fit for purpose - making all resources small enough to be fetched as necessary - or maybe you have to admit defeat to a dependency you don't control: the user's internet connection.
Or were you thinking about a different scenario where clients are justified in caching on startup?
- alkonaut 10y agoI think it depends on what "caching" includes. But any time you can accept zero UI delays later but can afford an initial delay of almost any length, then caching as much as possible is usually the right decision. In e.g a game scenario we might call this "precomputing" or "preloading" but it's really equivalent to memoization and caching of any other kind (you load the whole level rather than a part, you precompute trig tables rather than wait for the first access of sin(123) and so on). I make a thick (non-game) desktop app where quite a lot of data is computed on startup because 500ms spent during a splash screen is ok, but a 500ms delay to a user input is not. Web or database requests - probably not - so I can't imagine any scenario involving the web.