Deferred Writes: Performance Optimization and Database Gotchas

A look behind the scenes of implementing deferred writes in the CodeIgniter 4 Settings package: how batching write operations improves performance, and the subtle database portability issue caused by NULL values in unique constraints.

November 30, 2025 · 7 min

CodeIgniter Queue

While CodeIgniter 4 itself doesn’t have a built-in queue system, I have built one which rely on the database handler. But what is a queue? It’s a system that allows you to schedule and manage background tasks or jobs to be executed in the given order. These jobs can include sending emails, processing data, generating reports, and more. Using a queue system helps offload time-consuming or resource-intensive tasks from the main application, ensuring that the application remains responsive. ...

October 14, 2023 · 2 min