Articles Performance
TAG ARCHIVE

Everything on Performance.

21 articles tagged Performance, sorted newest first.

tooling

Profile a Slow Laravel Endpoint: SPX, Blackfire and Reading a Flame Graph Properly

Everyone can generate a flame graph. Almost nobody can read one. Here is the loop from a four-second endpoint to a merged fix, and why Kernel::handle is never the answer.

15 min read
laravel

Laravel Read Replicas: Route Reads to a Follower Without Serving Stale Data

The read/write split is four lines of config. The read-after-write bugs that turn up a fortnight later are the actual work — and sticky only covers one of them.

11 min read
php

json_validate() vs try/catch json_decode(): Checking JSON Without Building It

json_validate() landed in PHP 8.3 and immediately got used in the one place it makes things worse. Here is what it is actually for.

9 min read
livewire

Build a Debounced Live Search Input in Livewire 4 Without Hammering Your Database

A naive wire:model.live search turns every keystroke into a full round trip. Here's the debounce window, computed query, pagination reset and index that make it feel instant.

11 min read
laravel

Tune OPcache and Preloading for Laravel in Production

Most Laravel apps run OPcache on defaults and never touch preloading. Here are the production ini values, a focused preload script, and the deploy step that stops you serving stale bytecode.

11 min read
livewire

Skip Re-Rendering Livewire 4 Actions with #[Renderless]

An analytics ping shouldn't re-render your component and ship a DOM diff. Livewire's render phase is opt-out — here are the three ways to skip it, and when skipping it silently breaks your UI.

7 min read
php

Cache Per-Object Data Without Leaks Using PHP WeakMap

Caching data against an object in a plain array or SplObjectStorage quietly leaks memory in long-running workers. PHP's WeakMap lets the garbage collector reclaim those entries for you.

7 min read
laravel

Run Independent Work in Parallel with Laravel's Concurrency Facade

Turn six sequential dashboard queries into one parallel batch. A practical look at Laravel's Concurrency facade — run(), defer(), the three drivers, and when a queue is still the right call.

7 min read
laravel

The Complete Guide to Caching in Laravel: Tags, Locks, and Invalidation

Most Laravel developers know Cache::remember and stop there. This guide goes the whole way: drivers, stale-while-revalidate, cache tags, atomic locks for stampedes, and an invalidation strategy that survives production.

18 min read
laravel

Catch N+1 Queries Early with Eloquent Strict Mode

Turn N+1 queries into loud exceptions in development instead of silent latency in production. Here's what Eloquent strict mode does and exactly where to switch it on.

6 min read
php

PHP 8.4 Lazy Objects: Defer Expensive Initialization in Laravel

You inject a heavy service into a controller, the container builds it on every request, and half your routes never touch it. PHP 8.4 lazy objects let you defer that cost until the object is actually used.

7 min read
filament

Filament v4 Chart Widget — Polling Interval and Deferred Loading for Fast Dashboards

A four-widget Filament dashboard shouldn't take three seconds to paint. Tune the polling interval, cache the query, and let v4's lazy loading do the rest.

8 min read
laravel

Laravel Octane RoadRunner in Production — Tuning max_jobs, Worker Memory, and Supervisor

The four knobs that decide whether Octane on RoadRunner is a 5x performance win or a 3am pager: worker recycling, memory caps, worker count, and a Supervisor config that survives deploys.

7 min read
livewire

Livewire 4 #[Computed(persist: true)] — Cache Heavy Queries Across Requests

Livewire 4's #[Computed(persist: true)] flag turns a memoised method into a Laravel-cached value that survives every hydration cycle. Here's the gotchas.

7 min read
livewire

Livewire 4 @placeholder: Skeleton Loaders That Match Your Island Layout

Drop a @placeholder block inside a lazy island and your dashboard widgets get a skeleton that matches their layout: no more layout shifts when slow queries finally arrive.

9 min read
livewire

Livewire 4 wire:navigate: Get an SPA Feel Without Building a SPA

One attribute on your anchor tags turns a server-rendered Laravel app into something that feels like Next.js. Here's the prefetch tuning, @persist, and lifecycle hooks most tutorials miss.

10 min read
laravel

Laravel Octane + FrankenPHP: Production Deployment Without Surprises

FrankenPHP turns Octane from a benchmark trick into a production runtime. Here's the actual checklist for shipping it behind Nginx without a 3am incident.

9 min read
livewire

Livewire 4 Islands: Lazy-Load Expensive Components

Livewire 4 islands let you isolate expensive sections so they load independently without blocking the rest of your page. Here's how to use them.

7 min read
laravel

Processing large CSV files with Laravel's lazy collections

Loading a 100k-row CSV with `collect()` will blow your memory limit. Laravel's `LazyCollection` gives you the full Collection API backed by PHP generators: here's how to use it.

5 min read
laravel

Fire HTTP requests after your response with Laravel 12's batch defer

Laravel 12.32 adds defer() to Http::batch(): a clean way to fire outbound HTTP calls after your response is sent, no queue worker required.

5 min read
Laravel

Stop Wasting Monitoring Quota: Block Malicious 404s with NGINX

Malicious bots were burning through my Laravel Nightwatch quota by hitting fake routes like /wp-login.php and /.env. Inspired by Michael Dyrynda’s approach using Cloudflare WAF, I built a portable NGINX blocklist that stops these 404s before they reach Laravel: no proxy required.

5 min read