Foreword
- August 1999: When E-Commerce Was Uncharted Territory
- 2010: Back to Deutsche Telekom
- From Pioneers to Enterprise Standard
- Why This Book?
- Who Is This Book For?
- What to Expect
- After 30 Days
Chapter 1: The Performance Imperative
- Introduction
- The Business Case for Performance
- The Hidden Costs of Slow Stores
- Core Web Vitals: The New Rules of the Game
- The Performance Pyramid
- Case Study: Enterprise E-Commerce — Surviving Peak Traffic
- Checklist: Before You Start
- Summary
- References
Chapter 2: Performance Audit — Where Do You Stand?
- Introduction
- The 7 Performance Dimensions
- Tools for Your Audit
- Establishing a Baseline: The Audit Record
- Identifying Performance Killers
- Practice: Running an Audit
- Case Study: Auditing a Swiss Fashion Shop
- Summary
- References
Chapter 3: Measuring and Optimizing Core Web Vitals
- Introduction
- The Three Core Web Vitals
- Step 1: Collecting Field Data
- Step 2: Lab Data with Chrome DevTools
- Step 3: Implementing Quick Wins
- Step 4: Documenting Your Results
- Advanced: Automated Monitoring
- Checklist Days 1-2
- Summary
- References
Chapter 4: Image Optimization
- Introduction
- 4.1 The Shopware 6 Thumbnail System
- 4.2 The sw_thumbnails Function
- 4.3 Using Lazy Loading Correctly
- 4.4 Enabling WebP and AVIF
- 4.5 Optimizing Thumbnail Configuration
- 4.6 Optimizing Images Before Upload
- 4.7 Performance Measurement
- Checklist: Day 3-4
- Advanced Tips
- Summary
Chapter 5: Optimizing CSS and JavaScript
- Introduction
- 5.1 Understanding the Problem
- 5.2 CSS Optimization
- 5.3 JavaScript Optimization
- 5.4 Controlling Third-Party Scripts
- 5.5 Optimizing Shopware Theme Compilation
- 5.6 Performance Measurement
- Checklist: Days 5–7
- Summary
- Sources
Chapter 6: HTTP Caching — The Fastest Request Is the One That Never Happens
- Introduction
- 6.1 Understanding HTTP Caching
- 6.2 Activating Shopware’s HTTP Cache
- 6.3 Cache Strategies for Different Page Types
- 6.4 Stale-While-Revalidate: The Performance Booster
- 6.5 Varnish: The Turbo for High-Traffic Shops
- 6.6 Edge Side Includes (ESI)
- 6.7 Cache Invalidation
- 6.8 Cache Debugging
- 6.9 Performance Measurement
- Checklist: Days 8-10
- Summary
- References
Chapter 7: Mastering Shopware’s Application Cache
- Introduction
- 7.1 Understanding Cache Architecture
- 7.2 Understanding the Default Configuration
- 7.3 Redis as Cache Backend
- 7.4 Sessions in Redis
- 7.5 Cache Invalidation
- 7.6 Cache Warming
- 7.7 Troubleshooting
- 7.8 Performance Measurement
- Checklist: Days 11-12
- Summary
- References
Chapter 8: Database Optimization for Shopware
- Introduction
- 8.1 Shopware’s Database Architecture
- 8.2 MySQL/MariaDB Configuration
- 8.3 Slow Query Analysis
- 8.4 Index Optimization
- 8.5 Optimizing the Shopware DAL
- 8.6 Query Caching in the DAL
- 8.7 Shopware Storage Optimization
- 8.8 Database Maintenance
- 8.9 Replication and Read Replicas
- 8.10 Troubleshooting
- Checklist: Day 13-14
- Summary
- References
Chapter 9: Optimizing PHP Performance
- Introduction
- Goal of This Chapter
- Prerequisites
- Step 1: Check and Update PHP Version
- Step 2: Configure OPcache
- Step 2.5: Enable OPcache Preloading
- Step 3: Evaluate the JIT Compiler
- Step 4: Size PHP-FPM
- Step 5: Optimize php.ini for Shopware
- Step 6: Connect Nginx with PHP-FPM
- Step 7: FrankenPHP Outlook
- Troubleshooting
- Checklist: Day 15-16
- Summary
- More Complex Scenario?
- References
Chapter 10: Redis for High Availability
- Introduction
- Goals for This Chapter
- Prerequisites
- Step 1: Understanding the Problem — Single Point of Failure
- Step 2: Choosing the Right Solution — Sentinel vs. Cluster
- Step 3: Building the Redis Sentinel Architecture
- Step 4: Testing Failover
- Step 5: Configuring Shopware for Sentinel
- Step 6: Setting Up Monitoring and Alerting
- Troubleshooting
- Checklist: Day 17-18
- Summary
- More Complex Scenarios?
- References
Chapter 11: CDN Integration for Global Performance
- Introduction
- Prerequisites
- 11.1 How a CDN works
- 11.2 CDN Provider Comparison
- 11.3 Setting up Cloudflare (Recommended)
- 11.4 Configuring Shopware for CDN
- 11.5 Setting Cache Headers Correctly
- 11.6 Cache Invalidation
- 11.7 CDN for Dynamic Content
- 11.8 Image Optimization at the Edge
- 11.9 Security: DDoS and WAF
- 11.10 Measuring Performance
- 11.11 Optimizing Costs
- 11.12 Troubleshooting
- Checklist: Day 19-21
- Summary
- References
Chapter 12: Real User Monitoring (RUM)
- Introduction
- Prerequisites
- 12.1 RUM vs. Synthetic Monitoring
- 12.2 Core Web Vitals 2024
- 12.3 The web-vitals Library
- 12.4 Collecting RUM Data
- 12.5 Building a RUM Dashboard
- 12.6 Configuring Alerting
- 12.7 Interpreting RUM Data
- 12.8 Practical Checklist
- Summary
- References
Chapter 13: Continuous Performance Testing
- Introduction
- Prerequisites
- 13.1 Why Automated Performance Tests?
- 13.2 Lighthouse CI Setup
- 13.3 Defining Performance Budgets
- 13.4 GitHub Actions Integration
- 13.5 GitLab CI Integration
- 13.6 LHCI Server for Trend Analysis
- 13.7 Shopware-Specific Tests
- 13.8 Alerting on Regression
- 13.9 Practical Checklist
- 13.10 Load Testing: k6 and Locust
- Summary
- References
Chapter 14: Establishing a Performance Culture in Your Team
- Introduction
- Prerequisites
- 1. Performance as Shared Responsibility
- 2. Establishing Performance Champions
- 3. Code Reviews with a Performance Focus
- 4. Blameless Postmortems
- 5. Continuous Feedback Culture
- 6. Sharing Performance Knowledge
- 7. Organizational Anchoring
- 8. Common Culture Problems and Solutions
- Summary: Week 4, Day 26-27
- References
Chapter 15: The Long-Term Performance Plan
- Introduction
- Prerequisites
- 1. The 12-Month Roadmap
- 2. Quarterly OKRs for Performance
- 3. Managing Technical Debt
- 4. Performance Budgets Long-Term
- 5. Establishing a Maintenance Rhythm
- 6. Scaling Performance Work
- 7. Measuring Success: KPIs for the Full Year
- 8. Avoiding Common Long-Term Mistakes
- Checklist: Day 28-30
- Summary: Day 28-30
- References
Chapter 16: Shopware 6 Themes - Performance Optimization
- Introduction
- Prerequisites
- Companion Repository
- Understanding and Optimizing theme.json
- SCSS Variables and Bootstrap Overrides
- JavaScript Optimization
- Optimizing Twig Templates
- Implementing Critical CSS
- ESI Rendering for Header/Footer (Shopware 6.7)
- Migrating to Vite (Shopware 6.7)
- Measuring Theme Performance
- Checklist: Theme Performance
- Common Mistakes to Avoid
- Summary
- References
Chapter 17: Shopware 6 Plugins - Performance Optimization
- Introduction
- Prerequisites
- Companion Repository
- Using the DAL Efficiently
- Optimizing Event Subscribers
- Message Queue for Asynchronous Processing
- Controlling Cache Invalidation
- Optimizing Entity Indexers
- Analyzing Plugin Performance
- Checklist: Plugin Performance
- Summary
- References
Chapter 18: Shopware 6 Elasticsearch
- Introduction
- Companion Repository
- 18.1 Elasticsearch vs. MySQL: When Does the Switch Pay Off?
- 18.2 Elasticsearch vs. OpenSearch: Which One to Use?
- 18.3 Heap Configuration: The Most Important Setting
- 18.4 Shopware ES Configuration
- 18.5 Optimizing for the German Language
- 18.6 Customizing Index Mapping
- 18.7 Optimizing Indexing
- 18.8 Query Optimization
- 18.9 Monitoring and Troubleshooting
- 18.10 Migration: From MySQL to Elasticsearch
- 18.11 Advanced: Multi-Index Strategies
- 18.12 Vector & Hybrid Search (ES 8.x Forward)
- Summary
- References
Chapter 19: Mobile Performance
- Introduction
- Companion Repository
- 19.1 Understanding the Mobile Performance Gap
- 19.2 Google Mobile-First Indexing
- 19.3 Mobile Core Web Vitals
- 19.4 Touch Optimization
- 19.5 Responsive Images
- 19.6 Service Workers & Offline Performance
- 19.7 Mobile Checkout Optimization
- 19.8 PWA for Shopware
- 19.9 Network-Aware Loading
- 19.10 Mobile Performance Testing
- Summary
- References
Chapter 20: A/B Testing & Performance Experiments
- Goal of This Chapter
- Prerequisites
- Step 1: Understand Performance Experiment Types
- Step 2: Implement Statistical Foundations
- Step 3: Calculate Sample Size
- Step 4: Implement the Experiment Service
- Step 5: Implement Frontend Tracking
- Step 6: Template Integration
- Step 7: Define Performance Budgets
- Step 8: Run CLI Analysis
- Practical Example: Lazy Loading A/B Test in Shopware
- Troubleshooting
- Build vs. Buy: A/B Testing Platforms
- Summary
- References
Chapter 21: Third-Party Scripts & Tag Management
- Goal of This Chapter
- Prerequisites
- Step 1: Audit Third-Party Scripts
- Step 2: Lazy Load Google Tag Manager
- Step 3: Optimize the GTM Container
- Step 4: Consent-Based Script Loading
- Step 5: Use Partytown for Web Workers
- Step 6: Route-Specific Script Budgets
- Step 7: Set Up Performance Monitoring
- Step 8: Optimize Payment Provider Scripts
- Step 9: Server-Side Tagging with GTM
- Troubleshooting
- Checklist: Third-Party Audit
- Summary
- References
Chapter 22: The 20 Most Common Performance Problems
- Overview
- Problem 1: Slow Database Queries
- Problem 2: HTTP Cache Not Active
- Problem 3: Oversized JavaScript Bundles
- Problem 4: Unoptimized Images
- Problem 5: Missing Preconnects
- Problem 6: Render-Blocking CSS
- Problem 7: N+1 Query Problem
- Problem 8: Session Lock Blocking
- Problem 9: Heavy Cart Calculations
- Problem 10: Too Many Plugins
- Problem 11: Elasticsearch Not Configured
- Problem 12: OPcache Not Enabled
- Problem 13: Debug Mode in Production
- Problem 14: Missing Gzip Compression
- Problem 15: Slow Cronjobs Blocking the Server
- Problem 16: Too Many Active Themes
- Problem 17: Large Log Files
- Problem 18: CDN Not Configured
- Problem 19: Synchronous API Calls
- Problem 20: Missing Browser Cache Headers
- Quick Reference: Diagnostic Commands
- Checklist: Performance Troubleshooting
- Summary
Chapter 23: Five Performance Transformation Scenarios
- Introduction
- Case Study 1: Enterprise Telecommunications — Managing a Launch Meltdown
- Case Study 2: Swiss Fashion Shop — Mobile-First Optimization
- Case Study 3: B2B Industrial Supplies — Scaling Search
- Case Study 4: Black Friday Survival — The Night Everything Fell Apart
- Case Study 5: International Marketplace — Scaling Multi-Tenant
- Summary: Patterns Across All Case Studies
- References
Chapter 24: Outlook – New Technologies and Trends
- Introduction
- Core Web Vitals Evolution: INP Replaces FID
- HTTP/3 and QUIC: The New Transport Protocol
- Edge Computing: Running Code Closer to the User
- Shopware Roadmap: What Is Coming?
- AI-Assisted Performance Optimization
- Composable Commerce: The Future of Architecture
- Green IT: Performance as a Sustainability Factor
- Checklist: Future-Proofing
- Summary
Appendix A: Glossary
- A
- B
- C
- D
- E
- F
- G
- H
- I
- J
- K
- L
- M
- N
- O
- P
- Q
- R
- S
- T
- V
- W
- Z
Appendix B: Code Snippets Reference
- PHP / Shopware 6
- JavaScript / TypeScript
- Bash / Shell
- SQL
- Twig
- Additional Snippets
Appendix C: Configurations
- PHP
- Nginx
- Shopware
- MySQL / MariaDB
- Redis
- Supervisor
- Logrotate
- Environment (.env.local)
Appendix D: Resources & Links
- Official Documentation
- Tools
- Books & Articles
- Community & Support
- Services & Hosting
- Companion Repository
- Checklists
About the Author
- Mehmet Gökçe
- Book Feedback
Appendix E: Cheat Sheet — Shopware Performance at a Glance
- Core Web Vitals Target Values
- Infrastructure Target Values
- Shopware CLI Commands
- MySQL/MariaDB
- Redis
- PHP/OPcache
- Configuration Paths
- Quick Health Check
- The 20 Most Common Problems — Quick Reference