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