Need for Speed: Removing speed bumps in your APIs
summary
Survey of API Platform projects shows the usual culprit: database work and object hydration, not framework speed. Examples: a product list issues only two queries, an order list with relations makes five queries, adding product totals can jump to eleven queries. Fixes include Symfony profiler or Blackfire to spot N+1s, switching lazy/eager fetch, custom collection providers or single-query DQL, and precomputed read models; beware joins and hydration cost and Doctrine quirks (decimal fields trigger extra updates). Measure, then balance queries vs. hydration.
AI-written summary · about
chapters (9)
- 0:00The importance of speed
- 2:05Performance bottlenecks
- 4:13Algorithmic complexity
- 8:03Addressing the n+1 problem
- 14:01Optimization strategies
- 19:23Tooling and data types
- 23:04Serialization techniques
- 26:48Advanced performance hacks
- 31:41Conclusion and summary
related talks
39mWhat is Performance Driven Development and why aren't you doing it?
31mNo more slow requests
34mSymfony and Elasticsearch: debugging and optimizations
26mBuild a performance-optimized GraphQL API
29mClient Says Your Awesome Web App Works Slowly. Now What?
35mPHP: Performance and application development — what we diagnosed
58mNeed for speed 8, performance tuning of your web application
57mBuilding first-class REST APIs with Symfony
