🚀 Performance Optimization in Laravel

Dheeraj jha (@thedijje)

"Great performance is not accidental; it's a result of deliberate design, meticulous engineering, and relentless pursuit of excellence."

- Linus Torvalds

🤷🏻‍♂️But why?

  • 🤩 User experience
  • 🤑 Improved conversion rate
  • 🔍 SEO
  • 💰 Scalability and Cost saving
  • 📱Mobile first world
  • 😎 Competitive advantage

🤷🏻‍♂️ Why Performance?

1

Database optimization

3

Asset optimization

5

Optimizing Laravel Configuration

2

Caching stratagies

4

Queues and Background jobs

6

Testing & benchmarking

💾 Database optimization

💾 Database Optimization

  • Use Eloquent Query Optimization
  • Raw SQL and query builder
  • In Depth optimization
  • Indexing

1

Query optimization

  • Database Indexing
  • Database transactions
  • Procedures and functions

2

Schema level optimization

  • DB shrading
  • Table partitioning
  • Distributed query
  • Combination of Databases

3

Infra level

💭Caching Strategy

Caching Stratagy

💽 Database Caching

📁Asset/Media Caching

⏩ Redis/ Memcache

🔆 Asset optimization

  • Minification
  • Compression
  • Caching
  • Lazy loading
  • Use of Content Delivery Networks(CDN)
  • Asset Concatenation & Distribution
  • Optimized Images
  • Mind the view

🔆 Asset optimization

🪜Queues and Background jobs

Queues & Background jobs

Queues

Background jobs

Workers

⚙️ Optimizing Laravel Configuration

  • OPcache Configuration
  • HTTP Compression
  • Route Caching
  • Eager Loading
  • Optimized Composer Autoloading

⚙️ Optimizing Laravel Configuration

✅ Test & Benchmarking

  • PHPUnit
  • Laravel Dusk
  • Development
  • Apache JMeter
  • Siege
  • Laravel Telescope

✅ Tets and Benchmarking

✅ All set

Stay powerful, Keep exploring

Any Questions??

🙉

Dheeraj jha

DevOps Engineer, Traveller, Photographer, and Community volunteer for Laravel India

Lets connect

Twitter.com/thedijje

Hello@thedijje.com