[wp-hackers] Big fix for WP 2.1-alpha3
false.hopes at gmail.com
Thu Sep 21 21:01:22 GMT 2006
On 9/21/06, Owen Winkler <ringmaster at midnightcircus.com> wrote:
> Roland Haeder wrote:
> > On Thursday, 21. September 2006 19:52, Austin Matzko wrote:
> >> I wish I knew what it is I now know.
> > I have fixes some more notice messages which you can see
> > with "error_reporting(E_ALL);. I also added an "element cacher" and an
> > experimental and unfinished SQL cacher to it.
> More conversation on this topic continues in the ticket:
> I find it interesting that it seems to take PHP longer to figure out
> what to do with an uninitialized variable (as in the sample code), but I
> don't know that there is anywhere specific in the WP code where adding
> declarations would make as significant an impact as in the sample.
It doesn't, the logic in the ticket is flawed. It takes PHP longer to
generate a notice. Thus, if we had E_ALL on by default, there might be
a performance hit. But as you can see in line 77 of wp-settings.php,
all of it is a bunch of premature optimization. Setting the variables
even to an empty string probably takes longer in PHP < 5.2 because of
the extra malloc (PHP 5.2 has a new memory manager which takes a bit
of the overhead off this).
I should have worded the initial response on the ticket better, but I
can't go back and edit it. At any rate, its premature optimization,
which might end up having a negative impact on the execution time in
the long run. (Benchmarks coming)
More information about the wp-hackers