ID:               40363
 Updated by:       [EMAIL PROTECTED]
 Reported By:      r dot craig at chester dot ac dot uk
-Status:           Open
+Status:           Bogus
 Bug Type:         Performance problem
 Operating System: Linux 2.6.5-7.282-bigsmp
 PHP Version:      5.2.0
 New Comment:

Set the timezone correctly, otherwise it's expected to spend time
trying to "autodetect" your timezone based on your system settings and
looking in the timezone db.


Previous Comments:
------------------------------------------------------------------------

[2007-02-06 08:57:17] r dot craig at chester dot ac dot uk

If I put date_default_timezone_set("Europe/London") at the top,
performance is fine. 

But what was causing the slow-down and memory-usage? Any why only with
the with the array assignment (Which was not timed)?

Is it something to do with the E_NOTICEs? A notice was generated in
E_STRICT on 5.1.6 but it didn't affect performance.

------------------------------------------------------------------------

[2007-02-05 17:48:30] [EMAIL PROTECTED]

I don't understand what you're talking about.
Your code works 3x faster with 5.2.0 even WITH the array stuff.
0.37447214126587 (5.2.0) vs 0.96990513801575 (5.1.6)

Try to set the timezone correctly?

------------------------------------------------------------------------

[2007-02-05 17:37:23] r dot craig at chester dot ac dot uk

If I remove the strtotime() and just have the 4000 element array, it
also works faster. 

If I just remove the _assignment_ from the return_some_stuff() if also
works much faster.

But this is a sumation of a live peice of code. I want to make a 4000
array and then call strtotime 3000 times times (Is this so Odd?). This
is 10 times slower in 5.2.0 and uses 30 times as much memory.

If I take out all the code and just have "echo 'Hello World'", It's
also much faster, but that's not quite what I want to do!

------------------------------------------------------------------------

[2007-02-05 16:05:09] [EMAIL PROTECTED]

If you remove the 4000-elements array, 5.2.0 works 3x-4x times faster
than 5.1.6.

------------------------------------------------------------------------

[2007-02-05 15:35:53] r dot craig at chester dot ac dot uk

derick, but how does that compare to 5.1.6?

The memory increase during the strtotime() loop, I see is with no
php.ini (php -c /dev/null). 

E_STRICT gives me warnings on both 5.2 and 5.1.6, "strtotime(): It is
not safe to rely on the system's timezone settings... " etc.

Is it perhaps something to do with logging this warning? I thought if
strict was turned off it didn't log the error at all.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/40363

-- 
Edit this bug report at http://bugs.php.net/?id=40363&edit=1

Reply via email to