NoorDeen's avatar

what makes Lumen faster than Laravel 5 when thay use the same modules ?

when I open Lumen page I see Lumen compared to slim and silex but what about Laravel 5 ?

Why I need to use Laravel if Lumen is run quicker and have must common modules ?

0 likes
9 replies
pmall's avatar

I wonder too. Lumen is super fast out of the box but it is basically just a routing system. The benchmark wont be the same with many modules enabled.

@AlnourAltegani the first difference I can think of : lumen routing library is not the same. It is probably faster.

1 like
bobbybouwmann's avatar

Laravel comes out of the box with a bit more features then Lumen. While Lumen is really for microservices and api's and Laravel more for web applications.

How were you able to get the framework so fast, while still keeping so many great features? This is again due to the great convenience of the Illuminate components. Basically, all I needed to do was “glue” them together in a different way than a full-stack framework would glue them together. This means instead of maximum flexibility in the bootstrapping process, Lumen opts for maximum speed. The actual Lumen framework repository is probably only a dozen files or so. The rest is made up of the Illuminate components. This allowed me to flesh out the features of the framework very quickly, though it did take me three or four iterations to find a solution that was really, really fast while still providing very powerful features.

https://laravel-news.com/2015/04/lumen/

4 likes
NoorDeen's avatar

@pmall if the route is differant (better) why not use it in laravel 5 too ?

bashy's avatar

It's not just the routing. The whole path it takes is much shorter, which is why it's faster. I think the change is a big one and can't be just added into Laravel 5.

NoorDeen's avatar

@bashy you mean lumen initialize and handle requests different than Laravel 5 ? so it is much faster ?

did you benchmarked Laravel 5 ?

bashy's avatar

It does, someone posted a Blackfire route of a request. Think it's in the popular Lumen thread.

I haven't myself but it uses a lot less code than Laravel. You can't really compare the two because they're so different. It's like a supercar and an off-road vehicle, they do the same thing (drive) but differently.

NoorDeen's avatar

I haven't myself but it uses a lot less code than Laravel.

you mean there is some jobs laravel can do but lumen can not , like what ?

Please or to participate in this conversation.