I have Basic (Small) tier Azure Web App hosted in West Europe with a Basic SQL Database in the same region. Always On is turned on. Note that my website's target audience is in Europe.
Note that the website is CodeIgniter
based and runs on php 5.6
.
The page loads really slowly, even though on local environment everything is fast. After running PageSpeed Insights on my site I get the following assessment:
Reduce server response time In our test, your server responded in 1.7 seconds. There are many factors that can slow down your server response time. Please read our recommendations to learn how you can monitor and measure where your server is spending the most time.
When inspecting the site from developer tools
I get a similar picture:
As you can see the initial response is really bad. What could be the problem?
UPDATE/SOLUTION
Taking the advice of Gary Liu - MSFT's from the comments, namely enabling pconnect
in the database.php
the load time of the page went down to 0.23
seconds, that is an ~8x improvement.