Laravel is this respond time ok?

Viewed 348

I noticed some major slowness inside my laravel application. Even a basic route without any middleware or any operation takes around 250ms to load, on localhost. So i thought it's a bit crazy slow. What are your thoughts ? Is it because of my computer's performance ? Or it would get faster when i deploy it on a server ?

SPECS: laravel 5.7 Vagrant, Laravel/homestead (parallels, 6.4.0)

EDIT: More through details about timing: Timing

Test sample on the same environment but, newly created laravel 5.7 project. Project only has one controller and one basic method to return a variable which is $test=microtime(true) - LARAVEL_START;. Result is usually around 130~ ms. Considering that my actual application was returning view with some libraries and style sheets, it's pretty decent.

Conclusion for now: I guess this speed is totally fine for my local environment (considering pc specs and vagrant without nfs).


Edit 2: As @Tarasovych suggested, i did disable debugbar and used $test=microtime(true) - LARAVEL_START; to get the response time. Results as follows:

Without debugbar:

$test=microtime(true) - LARAVEL_START; 

$test is:

For initial, first call to the route: 500~ ms.

For refresh on the same route: 190~ ms.

With debugbar:

$test=microtime(true) - LARAVEL_START; 

$test is:

For initial, first call to the route: 530~ ms.

For refresh on the same route: 200~ ms.

So roughly, debugbar affect respond time by approx. 10~ ms. Maybe I should've also disable the app_debug in .env too ? I Haven't tried that yet.

If I didn't provide enough information, please let me know so I can update.

Thanks

1 Answers

For a development environment, this is acceptable. This isn't great performance for a production environment.

Related