Top Banner
Performance A Primer on Making Drupal Fast Martin Anderson-Clutz - Digital Echidna - @mandclu
43

Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Mar 15, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Performance A Primer on Making Drupal Fast

Martin Anderson-Clutz - Digital Echidna - @mandclu

Page 2: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Why Speed Matters

Page 3: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Performance Matters

Shopzilla – Speeding up their site by 5 seconds increased the conversion rate 7-12%, doubled the number of sessions from search engine marketing, and cut the number of required servers in half.

Mozilla – Shaving 2.2 seconds off their landing pages increased download conversions by 15.4%, which they estimate will result in 60 million more Firefox downloads per year.

Netflix – Adopting a single optimization, gzip compression, resulted in a 13-25% speedup and cut their outbound network traffic by 50%.

Page 4: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

What Users Want

47% of users expect a page to load in 2 seconds or less

40% abandon websites that take more than 3 seconds to load.

As little as 1 second of delay decreases customer satisfaction by about 16% - every second counts

46% of online shoppers cite checkout speed as the number one factor that determines whether or not they will return to a site

85% of mobile users expect pages to load as fast or faster than they load on the desktop

Page 5: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 6: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Benefits of Being Quick

UX

Conversions

$$$

SEO

Page 7: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Understanding Performance

Page 8: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 9: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 10: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 11: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Measurement

Page load

Full page load

Page render

First paint

Time to interact

Requests per second

Page 12: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Measurement Tools

Remote Monitoring (webpagetest.org, AlertSite, etc.)

ySlow

Google PageSpeed

Google Analytics

New Relic

Page 13: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 14: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 15: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 16: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 17: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 18: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 19: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 20: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 21: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 22: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 23: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 24: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 25: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 26: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by
Page 27: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

PHP Profiling

Watch the previous session on Blackfire

Page 28: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Know Your Audience

Geography

Technical

Browser

Bandwidth

Device

Page 29: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Key Factors

Page weight

Number of requests

3rd party assets

Delivery

Server

Complexity

Page 30: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

What tools or methods do you find helpful in

diagnosing speed issues?

Page 31: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Let’s make it better

Page 32: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

“Simplicity is the ultimate sophistication.”- Leonardo da Vinci

Page 33: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Site Strategy

Do less

Libraries

Modules

3rd party services

Performance budget

Page 34: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

http://shouldiuseacarousel.com/

Page 35: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Front End

Images!

Compress aggressively

Keep small

Lazy load

Remove unused CSS

Use JS only when absolutely necessary

Render-blocking elements at end of page

Page 36: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Caching

Page 37: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Site Build

Caching - Page, blocks, views

Aggregate CSS and JS

Disable/Uninstall unnecessary modules

Statistics

UI Modules

Search?

Page 38: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Modules

Site Audit

Advanced Aggregation

Asynchronous Prefetch Database Query Cache (APDQC)

Entitycache

Fast 404

Syslog

Page 39: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Hosting Environment

Enable mod_deflate to gzip text files

Reverse Proxy (Varnish, Nginx, etc.) or cache (Boost)

Content Distribution Network (CDN)

Data Cache (APCu, Memcached, Redis, etc.)

Version of PHP

Page 40: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

What’s in Drupal 8

Page 41: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Drupal 8

Full support for PHP 7

Entity Cache in core

Cache for logged in users

Asset dependencies

More granular cache

Cache Context API

#post_render_cache - placeholder HTML

BigPipe

Page 42: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

What modules or services have you found helpful?

Page 43: Performance - Drupal North - Drupal North.pdf · Martin Anderson-Clutz - Digital Echidna - @mandclu. Why Speed Matters. Performance Matters Shopzilla – Speeding up their site by

Questions?@mandclu