[wp-trac] [WordPress Trac] #19487: Remove useless calls to set_time_limit()
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 9 17:21:37 UTC 2011
#19487: Remove useless calls to set_time_limit()
--------------------------+------------------------------
Reporter: dllh | Owner: westi
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.3
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Changes (by kurtpayne):
* cc: kpayne@… (added)
Comment:
From the [http://us.php.net/manual/en/function.set-time-limit.php php.net
page for set_time_limit] (emphasis mine):
> Note:
>
> The set_time_limit() function and the configuration directive
max_execution_time only affect the execution time of the script itself.
Any time spent on activity that happens outside the execution of the
script such as system calls using system(), stream operations, database
queries, etc. is not included when determining the maximum time that the
script has been running. '''This is not true on Windows where the measured
time is real.'''
The potential harm of resetting the execution time counter should be
measured against the value of extending the execution time for Windows.
Is this causing a problem on your site?
A proposed workaround to reset the time limit for your site:
{{{
add_filter( 'http_request_timeout', function() {
set_time_limit(60); // Your time limit here
return 5;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19487#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list