thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

Navigation delay #18

Closed alyraptor closed 10 years ago

alyraptor commented 10 years ago

Since you guided us through clean URLs, my site navigation has slowed considerably. It's up to a ~2-3 second delay. Any ideas on why, or how to fix this?

thedigicraft commented 10 years ago

Hmm. I am curious if anyone else is having this problem or not. 2-3 seconds is a long time. That isn't normal. Are you doing yours on your local server or on a hosting company's server?

Dragotic commented 10 years ago

Well I'm currently using the script on my local machine and haven't notice any difference in the loading time between prior and after the use of clean URLs.

And I searched for a "script" that will help with times. I mean check if something that we change on the code really affects the loading time.

put this at the very top of your index.php:

<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
?>

and this at the very bottom:

<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo 'Page generated in '.$total_time.' seconds.';
?>  

And now check the loading time before and after implementing the clean URLsand see if that really is what causes the lagging.

thedigicraft commented 10 years ago

That is interesting. Have you tried a different computer and/or different browser? If you aren't already aware, you can access your local server from any other computer on your network. Just put in that computer's IP address followed by the folder it is in. 111.111.111.111/foldername

Have you found any results to using that code?

alyraptor commented 10 years ago

Okay, answering questions in order.

  1. Hosting the site on my own computer using XAMPP. I've also got an older version uploaded to a webhost and it's consistently much faster.
  2. Thanks for helping dragotic. The script is telling me a load time of roughly 1 second every time, even though actual load time is closer to 3 seconds. BUT this is happening even when I'm removing the clean URL functionality.
  3. Tried accessing it from a different computer on the network and I'm still seeing long load times.

I'm trying to upload to the webserver again to check load times. I'm having trouble figuring how to make Hostgator play nicely with .htaccess and it's becoming a headache. But it seems that my issue is probably somewhere based in my computer, and not necessarily with the URL rewriting.

thedigicraft commented 10 years ago

Aly,

One of the main reasons htaccess will mess on up your web hosting is if you have word press installed anywhere on there. Is that the case at all? Their htaccess can fiddle with everything else on the account.

alyraptor commented 10 years ago

Oh...yeah it's installed three times on the server. Crap.