#50652 [Opn->WFx]: time call optimization
| From: | derick@php.net | Date: | Mon, 04 Jan 2010 12:25:32 +0000 |
| Subject: | #50652 [Opn->WFx]: time call optimization | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146310@lists.php.net to get a copy of this message | ||
ID: 50652
Updated by: derick@php.net
Reported By: robert_xp at gmx dot net
-Status: Open
+Status: Wont fix
Bug Type: Performance problem
PHP Version: 5.3.1
New Comment:
We can't do this, as for longer running scripts the value as returned
by time() can change (like once every second).
Previous Comments:
------------------------------------------------------------------------
[2010-01-04 12:18:06] robert_xp at gmx dot net
Description:
------------
Sure, it is not so critical to patch this but you use ever time(NULL)
to get the current time in most functions. There is a better way going
over the SAPI interface and retrieve a cached value. I published also a
patch for all time(NULL/0) calls on
http://www.xarg.org/2009/12/php-hacking/
I also hacked the FCGI sapi to get the time value direclty from the
webserver - yes it is not supported by default.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50652&edit=1