Performance Intermediate

Speeding Up Your Laravel Application

Practical tips and tricks to boost your Laravel application's performance and reduce load times — the techniques we actually use on client projects at JTechBD.

JB Jahid Babu — Laravel Developer September 16, 2026 9 min read
Laravel 13 PHP 8.3+ Redis Octane Queues

Almost every slow Laravel app we've been hired to fix has the same root causes: unoptimized database queries, missing caching, heavy synchronous work happening during the request/response cycle, and unoptimized front-end assets. Laravel itself is fast — most performance problems are in how the application is built on top of it, not the framework.

1Why Laravel Apps Slow Down

Before reaching for advanced tools like Octane, it's worth diagnosing where the time actually goes. In our audits, the majority of "slow Laravel app" tickets trace back to just a handful of causes — and fixing them in the right order matters more than fixing them all at once.

2Fix Your Database Queries First

Database queries are responsible for the majority of slow page loads. Start here before touching anything else.

Eliminate N+1 queries with eager loading

PHP
// Slow — runs 1 query for posts + 1 query per post for its author
$posts = Post::all();
foreach ($posts as $post) {
    echo $post->author->name;
}

// Fast — runs 2 queries total
$posts = Post::with('author')->get();

Use the laravel/telescope or barryvdh/laravel-debugbar package during development to catch N+1 queries before they reach production.

Add indexes to columns you filter or join on

PHP — migration
Schema::table('orders', function (Blueprint $table) {
    $table->index(['user_id', 'status']);
});

Select only the columns you need

PHP
$users = User::select('id', 'name', 'email')->get();

Use chunking for large datasets

PHP
User::where('active', true)->chunk(500, function ($users) {
    foreach ($users as $user) {
        // process
    }
});

3Cache Everything That Doesn't Change Every Request

Laravel's cache layer is underused on most projects we audit.

PHP — cached query
$categories = Cache::remember('categories.all', now()->addHours(6), function () {
    return Category::orderBy('name')->get();
});
Use Redis for cache and sessions It's significantly faster under load than the database or file driver:
.env
CACHE_STORE=redis
SESSION_DRIVER=redis

Cache full config and routes for production — run these after every deployment:

Terminal
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan event:cache

4Move Slow Work to Queues

Anything that doesn't need to finish before you respond to the user — sending emails, generating PDFs, calling third-party APIs, processing images — should go on a queue, not run inline.

PHP
// Instead of this blocking the response:
Mail::to($user)->send(new OrderConfirmation($order));

// Do this:
Mail::to($user)->queue(new OrderConfirmation($order));

Run a proper queue worker in production with Supervisor so failed jobs retry automatically:

Terminal
php artisan queue:work redis --tries=3 --backoff=10

For a full walkthrough of jobs, workers, and Supervisor setup, see our Laravel Queues guide.

5Speed Up the Framework Itself with Octane

For high-traffic applications, Laravel Octane (powered by Swoole or RoadRunner) keeps your application booted in memory between requests instead of bootstrapping Laravel from scratch on every single request. This can cut response times dramatically on CPU-light, high-throughput endpoints like APIs.

Terminal
composer require laravel/octane
php artisan octane:install
php artisan octane:start
Audit before adopting Octane Code that relies on request-scoped state being reset (like static properties) needs auditing first — Octane isn't a drop-in fix for every app.

6Front-End and Asset Delivery

Backend speed doesn't matter if the browser is waiting 4 seconds for JavaScript and images.

7Measuring the Results

Don't guess — measure before and after every change:

ToolUse it for
Laravel TelescopeRequest-level profiling in development
Laravel PulseLightweight production monitoring (queries, jobs, exceptions, slow endpoints)
Google PageSpeed Insights / LighthouseReal-world front-end load times

Have a slow Laravel application?

We've been building and tuning PHP & Laravel applications for 14+ years.

Get Free Quote →

8Frequently Asked Questions

What's the single biggest performance win for a slow Laravel app?

Fixing N+1 queries and adding proper caching. In our experience these two changes alone account for the majority of speed improvements on client projects — before you need anything like Octane or a CDN.

Do I need Laravel Octane for a small business application?

Usually not. Octane pays off most on high-traffic APIs and apps with heavy concurrent load. A well-cached, well-indexed standard Laravel app is plenty fast for most small-to-mid-size businesses.

Does upgrading to Laravel 13 improve performance automatically?

Laravel 13 (released March 2026, requiring PHP 8.3+) brings framework-level improvements, but most real-world speed gains still come from application-level fixes — queries, caching, and queues — regardless of framework version.

JB
Jahid Babu — Laravel Developer, Rangpur BD

14+ years building PHP and Laravel applications for clients across Bangladesh, UK, Germany and the Netherlands.