One of the most important elements to good website design, is optimization. There is no point developing / designing a work of art site, where no one without a 2mb broadband connection can load it. Here is a nifty trick, taken from HarryB on the Joomla.org forums. It adds a little line at the bottom of your sites page, showing you the load time of each page.
You can then use that to stress test and see which mods are making the site load slowly.
Add just below your
tag of your index.php file:
// Start page load timer ...tick tock...
// -----------
$tstart = mosProfiler::getmicrotime();
?>
Add just above your tag (also in the index.php file).
// Display page generation time...
// ---------
$tend = mosProfiler::getmicrotime();
$totaltime = ($tend - $tstart);
printf ("Page was generated in %f seconds", $totaltime);
?>










Twitter updates
14 January 2010 at 5:37 pm
Eh, where’s the code? No sample code is shown above.
15 January 2010 at 3:39 pm
Sorry about that Forrest. We changed the styling of how our code looks in articles. This post was referencing the old way. Should be all good now.
8 February 2010 at 7:20 pm
no it doesn’t work.
Fatal error: Class ‘mosProfiler’ not found in P:\Xampp\htdocs\joomla\templates\……\index.php on line 10
huh…