Showing execution time of script
5 posts by 2 authors in: Forums > CMS Builder
Last Post: October 29, 2010 (RSS)
I've noticed on a number of pages the display of the execution time of the code to generate the particular page.
An example if when clicking 'Add or Upload Files', the window opens and shows a number of seconds at the bottom of the page. This has confused a customer who assumed the number of seconds signified the upload time but couldn't understand why it was displaying before uploading anything.
Is there a reason that this timer is displayed?
Thanks, Paul.
An example if when clicking 'Add or Upload Files', the window opens and shows a number of seconds at the bottom of the page. This has confused a customer who assumed the number of seconds signified the upload time but couldn't understand why it was displaying before uploading anything.
Is there a reason that this timer is displayed?
Thanks, Paul.
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:
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.
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
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.
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! :)
Thanks! :)
All the best,
Chris
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.
Thanks, Paul.