Support the ongoing development of Laravel.io →
Installation Configuration Packages
Last updated 1 year ago.
0

I haven't looked into this but I'm very interested to see the discussion. I imagine removing all the aliases and facades would help a lot.

Last updated 1 year ago.
0

First, run php artisan optimize, second install APC (of enable opcache in php5.5) If you want real speed for cached pages, you can use Varnish (or the slower but easier to setup HttpCache from symfony; https://github.com/barryvdh/laravel-httpcache). I go from around 250ms to 70ms for my own website, when using httpcache (but doesn't work for user specific content etc) And disable the ServiceProviders you don't need. You can also compile more files, if you use those files on every request. Check the files datacollector from my debugbar (enable it in the config) and you can see which files are loaded. You can add some of the classes to the config/compiled.php file and run php artisan optimize --force to test it. (But this could break it, and then you would need to delete bootstrap/compiled.php manually and try again).

Also remember to use caching, to prevent unnecessary calls to files or the database.

Last updated 1 year ago.
0

@barryvdh ; WIll look into that...

I am trying to get this response time for a login action (via AJAX).

I need it to be really fast. So, I tried writing a vanilla php script and managed to get <40ms response.

But, I have no clue how to verify user password without touching laravel !

Last updated 1 year ago.
0

I noticed that on my windows computer the booting time was near 200ms, but once the application was deployed to the linux server, the total load time of each page was under 60ms and this is for a twin core linode virtual box so there must be something weird going on with windows.

0

carbontwelve said:

I noticed that on my windows computer the booting time was near 200ms, but once the application was deployed to the linux server, the total load time of each page was under 60ms and this is for a twin core linode virtual box so there must be something weird going on with windows.

Or, it's just further evidence that Windows sucks? ;)

0

There are lots of ways to optimize Laravel performance.

First of all, there are PHP artisan commands:

php artisan optimize

php artisan config:cache

php artisan route:cache

You can use these commands to precompile the assets.

You can also use Eager Loading with Eloquent. This will retrieve all the associated object models in response to the initial query.

You can cache query results as well. Use following command for this:

$posts = Cache::remember('index.posts', 30, function()

{return Post::with('comments', 'tags', 'author', 'seo')->whereHidden(0)->get();});

Source: complete list of Laravel performance optimization tips.

0
Last updated 5 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mcraz mcraz Joined 12 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.