3 ms·
I 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 cachi
by alkonaut 10y ago
I 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.