[wp-hackers] WordPress PHP Extension
Jacob
wordpress at santosj.name
Wed Nov 14 05:17:02 GMT 2007
Midgard[1] has it, ADODB has it, why not WordPress[2]? I suppose, this
is better split in two parts.
The first part is the question of whether anyone has explored this for
WordPress before. If so, how did they fare? There are a few challenges
of building and maintaining a PHP Extension that requires constant
maintenance. If anyone has known of anyone doing so, can they let me know?
The obvious answer of why there isn't one, is because WordPress
development is constantly evolving and keeping up with even a small team
would be difficult. How the two projects above handled it was to take
the most time consuming parts and place them in C/C++ code and call
those functions, if they exist, where needed.
It is not impossible to translate PHP code to C/C++, even with MySQL
connections intact. There are two ways to go about it. However, if you
are going to develop an optimized, you'll want to hook into PDO or the
underlying API that the MySQL extension itself uses to push it that much
further.
It really goes beyond Opcode Caching to a realm slightly faster than
that. Having access to the underlying C/C++ code allows for usage of
quicker structures than Hashes.
I thought about it. Just a thought really. Would anyone be interested in
this exercise in entertainment (building PHP extensions is fun, honest)?
Thought I would ping the hackers to see what your opinion is on the
matter. Really, I wouldn't have thought about it, if it wasn't the
discussion on optimizing the Plugin API (still have to submit that
updated patch).
[1] http://www.midgard-project.org/
[2] The main setback would be that not many users has access to
compiling PHP (or know how to compile PHP), therefore the audience of
such an specialized Extension would be small.
--
Jacob Santos
http://www.santosj.name - blog
http://wordpress.svn.dragonu.net/unittest/ - unofficial WP unit test suite.
Also known as darkdragon and santosj on WP trac.
More information about the wp-hackers
mailing list