26.6 Putting It All Together
Optimizing a website, making it more performant, is all about making the website fast. The way to do this is to make sure we are doing as little work as possible. We request information from the database only if we don’t already have it, and we opt for more complex queries over multiple queries.
We also rely on caching. The idea is simple: if we’ve already done it, we don’t do it again until we need to. It’s a bit more difficult to figure out when to cache, which is why most beginning caches simply work on a time basis.
On the web, speed is key. Users are known to leave websites that take too long to load, and the definition of too long is over 200 ms. We used the debug-toolbar app to look at our page speeds, but ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access