Should you use Lumen for a speed boost?
Published on by Eric L. Barnes
Lumen came out back in 2015 as a lighter faster version of Laravel. The goal was to be able use it when speed was super important on a project or API.
Since that release, Laravel itself has been getting faster and faster, and new things such as Laravel Octane have came out which actually makes it faster than Lumen.
So to answer the question, should you use Lumen today? Taylor summed it up on Twitter:
I get a fair amount of questions about Lumen. If you need a little speed boost over plain Laravel (be sure that you *actually* need this first!), then I suggest using Laravel + Octane. 🚀— Taylor Otwell 🪐 (@taylorotwell) September 23, 2021
That combination is faster than Lumen.
I'd just like to remind you that Laravel itself is plenty fast enough for 80% of all use cases, but there are times when you really need some extra performance and Laravel + Octane is the way to go.
Just remember premature optimization is the root of all evil, and until you hit the point where you have maxed out everything. Remember that basic things like your database queries and Eloquent queries can cause more performance issues than people realize. One easy thing to fix N+1 issues is to disable lazy loading in development.