i am developing a new section on my site and ive notice a small latency when login. on my computer it works great but when i put it to th eserver it is slower. the login process is slower on the server and not on my cmoputer.
half second to 1 second slower
i have doubt on my hosting that is not as fast as they say since on my computer its fast.
is there a way i can monitor the speed of the server command line
or php script
i can run to find out what's wrong?
Put these three lines of code in various places in your script (replacing "foo" with a description of where you place it in the code):
$h = fopen('log.txt', 'a');
fwrite($h, 'foo: ' . microtime(true));
fclose();
Then, run your script, and you can see which part is slow.
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