[wp-hackers] Re: Streamlining Includes
Jacob Santos
wordpress at santosj.name
Mon Mar 3 07:39:19 GMT 2008
Ha ha, I just thought of something which is funny. You could basically
create a PHP extension, which takes all of the files in wp-includes and
"autoloads" them. You wouldn't even need that much C to do so. The nice
thing, is that it would be easy to keep the extension updated to the
latest of WordPress.
Here is the funny part: Basically, during the PHP Init stage, it will take
all of the PHP files and compile them. Okay, this is painful for CGI SAPI.
However, for mod_php and FastCGI, the files would always exist within PHP,
unless the process/PHP thread is closed. The files would only be compiled
once and the compiled version will exist for each PHP process.
> On Sun, Mar 2, 2008 at 10:10 PM, Jacob Santos <wordpress at santosj.name>
> wrote:
>> This system also totally circumvents opcode caches like APC.
>
> Not totally, but some parts are circumvented. Top loading is
> definitely faster than conditional loading with APC. Most people
> don't have any sort of opcode cache, however. Not loading and
> interpreting a bunch of stuff will be faster for them, even given the
> overhead of conditional loading. At least my half-assed profiling
> awhile back suggested it is faster. Better profiling is needed for
> anything we decide to do, and we need to take into account operating
> both with and without an opcode cache.
>
> Some interesting links discussing conditional loading and caching:
>
> http://pooteeweet.org/blog/538
> http://marc.info/?l=pecl-dev&m=116505905429984&w=2
> http://marc.info/?l=pecl-dev&m=116512075914909&w=2
> http://marc.info/?l=pecl-dev&m=116517663120391&w=2
The pooteeweet.org blog post is basically saying the same thing I'm
saying, since I've read the blog post a while ago and the follow
discussions explaining what Rasmus was saying. You need a Masters degree
sometimes...
You know, all four resources back up my arguments perfectly. Thank you for
doing my research for me. I will suggest that you reconsider writing the
API, because your time could be better placed with creating some super
cool feature that users and developers actually need. No offense, if I was
an ass.
--
Jacob Santos
http://www.santosj.name - Personal Blog
http://funcdoc.wordpress.com - WordPress Function Documentation Blog
More information about the wp-hackers
mailing list