laravel-performance

Optimize Laravel application performance with caching, queues, and database query tuning.

1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/sasabajic/laravel-best-practice-skills --skill laravel-performance-sasabajic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-performance
Source: https://github.com/sasabajic/laravel-best-practice-skills/tree/main/laravel-performance
Command: npx skills add https://github.com/sasabajic/laravel-best-practice-skills --skill laravel-performance-sasabajic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses slow Laravel application performance by providing best practices and actionable strategies for optimization across caching, queues, database interactions, and more.

Core Features & Use Cases

  • Caching Strategies: Implement effective caching for frequently accessed data and manage cache invalidation.
  • Queue & Job Management: Optimize background task processing with proper job configuration, dispatching, and error handling.
  • Database Optimization: Improve query performance through indexing, efficient querying, and preventing N+1 problems.
  • Configuration & Response Tuning: Leverage caching commands and optimize API/response delivery.

Quick Start

Apply the recommended caching strategy for frequently accessed data in your Laravel application.

Frequently Asked Questions about laravel-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Laravel database queries to fix the N+1 problem?

To fix the N+1 problem in Laravel, implement eager loading to retrieve relationships upfront instead of lazy loading. This database optimization technique prevents multiple unnecessary queries during data retrieval, significantly reducing performance bottlenecks and improving application speed.

What's the best way to implement Laravel caching with Redis for frequently accessed data?

The best way to implement Laravel caching with Redis is to store frequently accessed data in memory and manage cache invalidation properly. This strategy reduces database load, improves resource utilization, and significantly speeds up data retrieval across your application.

How do I optimize Laravel queue and job management for background processing?

To optimize Laravel queue and job management, configure proper job dispatching and error handling for background tasks. Utilizing tools like Horizon enhances throughput, ensures efficient resource utilization, and addresses performance bottlenecks in background processing.

How does database indexing improve Laravel application performance?

Database indexing improves Laravel application performance by allowing faster data retrieval without scanning entire database tables. Following indexing best practices reduces query execution time, directly addressing common performance bottlenecks related to database interactions.

Do I need Redis and Horizon to improve Laravel application speed?

You do not strictly need Redis and Horizon, but they are recommended to improve Laravel application speed. Redis provides advanced caching strategies, while Horizon enhances queue management throughput, and together they maximize resource utilization and background processing efficiency.