Every hard problem in computing has a shortcut named after it. This one's called caching, and it's just the art of not doing the same work twice.
The whole trick
Compute something expensive once, keep the answer close, hand it back instantly next time. That's it. Your browser does it, your CPU does it, your brain does it when you recognize a face across a room.
The catch everyone quotes
There are, famously, only two hard things: naming things, and knowing when your remembered answer has gone stale.
A cache is a promise that the world hasn't changed since you last looked.
Most "slow app" problems are really "we forgot to remember" problems. Sub-second experiences usually aren't faster computers — they're better memory.
Where is your app re-answering a question it already knows?