Re: [backdream] How to add a sub that can show forum load time?In reply to

Hi backdream,

You'll need to install the Time::HiRes module in order to do this - otherwise the best you can get is whole seconds - and even if you see "1 second" it could be anywhere from 0.00001 seconds to 1.999999 seconds. Hence, doing this without Time::HiRes is almost pointless.

You'll need to make the changes in gforum.cgi (I've done this from time to time for development/optimization purposes). Basically, add this line immediately after all the "use" statements in the file:

Code:

use Time::HiRes;

Then add this line immediately after "sub main {":

Code:

$GForum::Start::Time = Time::HiRes::time();

After that, you're going to have to add a global - called "time_elapsed", perhaps. Its contents will be:

Re: [backdream] How to add a sub that can show forum load time?In reply to

4s under modperl?! Your server must be heavily overloaded by other things, there is no way it should take that long. On a forum this size on a win2k, amd700, 512 megs of ram, and using MSSQL 2000, it averages 0.25s per page.

Re: [Jagerman] How to add a sub that can show forum load time?In reply to

Hi Jason,

I put the variable <%time_elapsed%> in include_footer.html and also in include_header.html. I get around 0,40s in include_header.html and around 1.50s in include_footer.html for the same page. Is it normal that I get two different times in the same page? If so, it meens that the place where we put the variable in the template changes his output.

Re: [Franco] How to add a sub that can show forum load time?In reply to

Various template calls and globals run throughout the page, so the difference you see is the amount of time to get through everything in the template. There is usually nothing intensive after include_footer.html, so that time is the usually the best one to go by. Jason Rhinelander Gossamer Threadsjason@gossamer-threads.com

Re: [carfac] How to add a sub that can show forum load time?In reply to

See the second post in the thread - your gforum.cgi would have been overwritten in the upgrade, so you'll need to make those two small modifications again. Jason Rhinelander Gossamer Threadsjason@gossamer-threads.com

Gossamer Threads is a Vancouver-based company with over 23
years experience in web technology. From development to hosting, we
partner with leading organizations around the globe and help to build
their web presences, strategies and infrastructures.