I just set this page in the routing file web.php
:
Route::get("/speedtest","SpeedController@speed_test");
Here is the speed test function:
public function speed_test(){
return view("speedtest");
}
That returns speedtest.blade.php
which contains just a hello world
.
It takes between 2.5 s and 3.5 to load this page.
Other pages that use a middleware and some queries needs between 3.5 and 6.5 seconds. The database is almost empty and the queries returns just 3 or 4 items (something like Files::where(user_id, Auth::user()->id)->get()
).
So everything is slow, even empty sites. There is definitely something wrong.
The site is alone in a server with 4 GB RAM, SSD and 1 Gbit connection
Any help?
Best Answer
Things to do to increase speed:
Run all that and report the time improvements!
You also, for best performance, make sure that Zend OPcache extension is installed and loaded (that's another question).