Is there a built-in way to benchmark and track down slow code in Laravel?
Or is it more effective to just do a cachegrind out?
Every page on one of the sites I just built is taking 1-2 seconds to load regardless of how simple the page is.
The laravel-debugbar package is a really great tool to figure out what is causing your slow load times.
It can be added by adding:
"barryvdh/laravel-debugbar": "dev-master",
To your composer.josn file then:
'Barryvdh\Debugbar\ServiceProvider',
as a ServiceProvider in app/config/app.php
Then you can publish it using artisan (only to the environment you want to run tests on).
php artisan debugbar:publish
You can find better instructions on their github page here.
Thank you for the suggestion! Here are a few screenshots of the debugbar:

Another solution which I use is Clockwork. Give it a try, I think you'll like it.
https://github.com/itsgoingd/clockwork
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With