If you ain’t first you’re last: Shake and bake maneuvers for web and WordPress sites that have a need for speed.
ROBERT LI | WP Engine
2019
If you aint first youre last: Shake and bake maneuvers for web and - - PowerPoint PPT Presentation
If you aint first youre last: Shake and bake maneuvers for web and WordPress sites that have a need for speed. ROBERT LI | WP Engine 2019 My name is Robert Li. Im a Solutions Engineer for WP Engine. Who is this idiot? Ive
ROBERT LI | WP Engine
2019
My name is Robert Li. I’m a Solutions Engineer for WP Engine. I’ve founded 3 startups and exited 1. I have a 3 year old teacup pomeranian named Chelsey. I am a long suffering Knicks fan. I love making WordPress do weird, wonderful things.
1. Why is SPEED important? 2. Understanding the engine that powers your site. The full stack. 3. Performance Budgeting 4. How do you measure it? 5. Infrastructure or the ‘Puter 6. Applications and Caching 7. Common Front-End & Other Speed Traps
Developers & Technical Marketers Basically anyone who has a WordPress site on the Internet Focus: WordPress Oriented Difficulty: Intermediate - we’re going to get pretty nerdy here.
Since Google’s July 2018 speed update bots have had a vendetta against slow sites.
This is what the User is seeing. This is a User’s first point of contact with the Internet. This is the software that creates the website itself. This is the “computer” that powers the software.
Most of the focus is usually placed on the Browser layer
How much would you pay for it?
How long would you wait for it?
A Performance Budget forces you to justify every features against the performance
Performance budgeting requires buy-in from marketers, developers, product managers, engineers, leadership (basically everyone). The earlier a performance culture is implemented in a project the less effort, time and money needed on optimization.
Setting a budget is not complicated...
https://codepen.io/robertliwpe/full/poorzBE https://www.performancebudget.io/
Don’t test for less than 20% difference between time. Set your budget in relation to competitors (e.g. 20% faster)
https://submarine-cable-map-2019.telegeography.com/
cache (n.) A cache is a store of items that is predicted to be accessed soon or is frequently accessed in a location that’s closer and/or faster to access.
https://medium.com/datadriveninvestor/all-things-caching-use-cases-benefits-strategies-choosing-a-caching-technology-exploring-fa6c1f2e93aa
Your MacBook does it So does your mail As do websites.
Test how each caching layer interacts with the stack and the improvement in performance before moving lower down the stack.
Caches content to Points of Presence close to user. High capacity and throughput EDGE network to handle requests at scale. Improves latency and load time.
Full Page vs. Static
Reduce latency and computational intensity by offloading TLS handshake at the EDGE.
It’s faster...
Extending the cache for content that doesn’t change means it doesn’t need to be built again and can be held in browser and CDN memory indefinitely.
If it doesn’t change don’t fetch it again
Choosing a fast DNS host will reduce domain name resolution time by up to 150ms. It might not seem much, but it’s free… So there’s no excuse. Remember...
If you’re not first you’re last.
Unless you are changing your domain
store domain name information on EDGE recursive DNS hosts. This reduces lookup time.
DNS can be cached too
Still a good idea to minify and concatenate HTML and CSS, and control data serving strategy.
Easy to use High ROI
Unless transparency is needed, use newer lossy formats ‘.jpg’ and ‘.webp’ Avoid animated ‘.gif’. Factor and size them appropriately. Do you really need a 4k by 3k hero image at 300ppi?
45% of the web STILL uses PHP5 Simply upgrading PHP to the latest version for a big performance boost. Also PHP 7.1 and lower is no longer going to be supported - it’s insecure
Keep the WordPress site lean by offloading major assets. Serve video and audio files from purpose built platforms. Inefficient and unoptimized to serve directly from local.
Just because you can, doesn’t mean you should.
WordPress 5.0 introduced blocks that are reusable and don’t require a whole theme to run. Full themes often come with bloated functionality and content that’s not required.
Don’t use plugins if possible. Choose lightweight plugins. Delete unused plugins. Best practice is less than 20.
Admin-ajax uses apache to dynamically render elements on a page, but it is incredibly resource intensive and impossible to cache.
Don’t do it!
Load only what is being seen first to improve the perception that your site is fast.
It’s not laziness. It’s being efficient.
MyISAM is the traditional MySQL engine, but it's incredibly inefficient. InnoDB locks off less data when accessing a table.
Greater concurrency Greater scalability
IF THE BOAT WAS THE DB
Over time WordPress loads up your database with all sorts of junk. It becomes more and more resource intensive for a site to find data it needs. Clean up unused data and revisions with a plugin like WP-sweep.
Robert Li E: robert.li@wpengine.com P: +61-(0)-7-5613-1084 SM: LinkedIn (Look Left!)