I’ve recently migrated my project to V2021. However, it takes 5-12 seconds for each page including the login page to load. However, it strangely works very fast on the live server. Can someone please help me out in fixing the issue on localhost? I’m currently using WAMP 3.2.3.3 64 bit with Mysql 8 and PHP 7.4.9.
Perhaps you may upgrade your RAM, for example to 8 or even 16 GB.
I’m working on MacBook Pro with SSD and 16 GB RAM already. I enabled the debug mode and the total page processing time is hardly 1 second. However, it keeps on loading and loading and then abruptly the page appears. There might be some glitch in the wamp server as the same works perfectly fast on live server.
Make sure URL Rewrite is set up for the Apache web server properly.
I’ve checked all the settings and found as per details mentioned in the link. I’ve additionally monitored the response through network feature of the browser and observed that every page including the login one has approx 8 seconds time for TTBF response. I’m unable to fix it as other projects are working quite fast.
Check your connection info again (including Database_Connecting server event, if used), make sure you are not connecting to a remote database server (e.g. your production server) so the response from the database server is slow.
Thanks for the prompt response. I haven’t used the Database_Connecting server event in my project. I’ve also confirmed that the application is not connected to a remote database server. Is there any luck?
You may try to enable Debug, log the SQLs and then check the execution time, see if it was due to database response (or else other thing).
Thanks again for the guidance. I’ve already enabled debug mode. All queries takes less than half a second. However, the TTFB (Time To First Byte) as examined through network feature of the browser takes 7-12 seconds. I’ve even tried to access a resource in the directory like accessing image by pasting its link in the URL and it takes the same 7-12 seconds despite the fact that it has no queries or complex logic involved. I’m pretty sure now that it is some sort of glitch either at the wamp server or something has happened during the migration process.
I am with the same problem. Did you find any way to fix it? Since I migrated from v2020 to v2021 my project is running slow in localhost but in live server is fast.
It seems PHP is not suitable for Windows Operating System. That is why it is slower in localhost (which is Windows OS) than in production server (which is Linux Operating System).
You may Google Improve PHP performance on Windows for more info.
To test PHP locally, I recommend Apache web server which is much faster than IIS, see Test PHP locally with Apache Web Server.
This guide was definitive to me and fixed my problem. My operating system is windows 10 x64 and I use WAMP for local testing. My computer settings are: 16GB RAM SSD 1TB and i7 processor.I think may be some wamp upgrade that caused this situation.
Thank you.
I’ve installed xamp and the issue resolved. I’m still not sure what was the issue with wamp for that particular application. Anyways, i’m happy it worked. Thanks everyone for the valuable suggestions and help.