Showing execution time of script

5 posts by 2 authors in: Forums > CMS Builder
Last Post: October 29, 2010   (RSS)

Re: [pothompson] Showing execution time of script

By Chris - October 27, 2010 - edited: October 27, 2010

Hi pothompson,

Hmm. I don't really have a good answer for that question! I suppose it might be useful sometimes to know whether the server is being slow or if it's your internet connection.

You can disable the timer from being displayed on every page by changing a CMS Builder source code file. Edit cmsAdmin/lib/common.php and search for "showExecuteSeconds". Add the line in red below:

function showExecuteSeconds($return = false) {
return '';


Note that upgrading CMS Builder will overwrite this change, so you'll need to make it again if you ever upgrade.

I hope this helps! Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Showing execution time of script

Thanks Chris, maybe this could be added to the General Settings, or a plugin hook added so that this can be disabled without having to do it each time the software is upgraded?

I'll implement your change for now though, thanks again.

Re: [pothompson] Showing execution time of script

By Chris - October 28, 2010

That's a good idea. I'll add that to our feature request list.

Thanks! :)
All the best,
Chris

Re: [chris] Showing execution time of script

I actually found that by implementing your change did get rid of the number of seconds to execute the code, but left the word 'seconds'. I've now searched for called to showExecuteSeconds and commented them out, but if you do add something to a future release then I think it would be a useful feature.

Thanks, Paul.