DRUPAL PERFORMANCE A Surgical Approach � 1 � 1
@mandclu MARTIN ANDERSON-CLUTZ � 2
PERFORMANCE � 3
SHOULD YOU CARE? Amazon - every 100ms of latency cost 1% in sales - Shopzilla – speeding up their site by 5 seconds: - conversion rate: +7-12% - sessions from SEM: +100% - required servers: -50% - COOK - reducing page load time by 0.85 seconds increased - conversions by 7% � 4
SPEED FOR SEO Speed is a ranking factor - Mobile since 9 Jul 2018 - Desktop since 2010 - Speed is a crawling factor - Crawl budget - Crawl rate - � 5
SPEED VS RETENTION 60.0 58% 45.0 Bounce Rate (%) 30.0 20% 15.0 12.8% 0.0 0 2.5 5 7.5 10 Load Time (seconds) Source: Akamai � 6
POTENTIAL FACTORS Server - Code - Number of modules - Complexity of modules - Custom code - Configuration - Caching - Assets - Third-party assets and services - � 7
A SURGICAL APPROACH Test Diagnose Operate Monitor � 8
TEST � 9
DEFINE THE PROBLEM DELINEATE IDENTIFY ISOLATE What can/can’t Which pages Where in the be changed in need attention? page(s) does it the site? occur? � 10
DELINEATE “Nice to haves” vs. true requirements - Remarketing pixels - Social widgets - Carousels - � 11
http://shouldiuseacarousel.com/ � 12
“Simplicity is the ultimate sophistication.” � 13
IDENTIFY - GOOGLE ANALYTICS � 14
IDENTIFY - SCREAMING FROG � 15
ISOLATE Run detailed tests to determine where in each page the - slowdown(s) occur: Page Load - On-Site Assets - 3rd Parties - � 16
� 17
� 18
� 19
DIAGNOSE � 20
PAGE LOAD � 21
GO DEEP Site Audit (contrib module/drush command) - New Relic (commercial / free on Pantheon) - Blackfire (commercial) - � 22
� 23
� 24
� 25
� 26
� 27
� 28
� 29
� 30
� 31
IMPROVING PAGE LOAD Data Page Content - - Remove external loads Break into more pages - - Views show SQL query, Keep markup clean - - EXPLAIN Load hidden content via - AJAX instead � 32
IMPROVING FIRST BYTE Server Cache - - CPU, RAM Page caching - - PHP 7.1+ Views output cache - - Varnish Views data cache - - Data Cache - (APCu, etc.) � 33
MODULES! Consider adding: Uninstall: - - BigPipe AS MANY AS POSSIBLE! - - Fast 404 Devel - - Syslog UI Modules - - Purge Statistics - - Search? - Database log - (in favour of syslog) PHP Filter - � 34
ON-SITE ASSETS � 35
ON-SITE ASSETS Images! CSS and JS - - Keep small Use only what’s necessary - - Responsive images esp. Aggregate - - for banners Compress and minify - Optimize Render-blocking elements - - Compress aggressively at end of page - Lazy load Content Delivery Network - - (CDN) � 36
GO DEEP Lighthouse audit (Chrome) - Page Speed Insights (Google) - � 37
� 38
� 39
� 40
MODULES! Advanced Aggregation - Responsive Image - Image Optimize/Kraken - Image Lazyloader - CDN - � 41
3RD PARTIES � 42
3RD PARTIES Use as few as possible - or load on user interaction - Cache and serve with local assets - (ideally via CDN) Consider aggregator services, especially for social - sharethis, addtoany, etc. - � 43
MODULES AddToAny - Relocator (part of AdvAgg) - � 44
OPERATE � 45
MAKE IT SO Don’t do everything at once - Make changes in small increments - Test and measure before and after deploying - Iterate quickly - Start with quick wins - � 46
EFFORT VS IMPACT Low Effort High Low High Impact � 47
MONITOR � 48
MONITOR Performance metrics as part of site health - CI integration - New Relic - Blackfire - Sitespeed.io - Modules: - Monitoring - Performance monitor - � 49
� 50
� 51
� 52
#DRUPALCONTRIBUTIONS Join us for contribution opportunities Friday, April 12, 2019 Mentored First Time Contributor General Contributions Workshop Contributions 9:00-12:00 9:00-18:00 9:00-18:00 Room: 606 Room: 6A Room: 602 � 53
WHAT DID YOU THINK? Locate this session at the DrupalCon Seattle website: http://seattle2019.drupal.org/schedule Take the Survey! https://www.surveymonkey.com/r/DrupalConSeattle � 54
<SHAMELESS PLUG> � 55
QUESTIONS Q COMMENTS � 56
THANKS! � 57
� 58
� 59
Recommend
More recommend