Re: Porting PECL to userspace
| From: | David Muir | Date: | Sat, 21 May 2011 07:06:42 +0000 |
| Subject: | Re: Porting PECL to userspace | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52493@lists.php.net to get a copy of this message | ||
On 21/05/11 01:15, Larry Garfield wrote:
> Hi all.
>
> I'm working with a fellow developer on an experimental project. There
> are some PECL modules that we want to try and use in an open source
> project where we cannot guarantee that PECL modules will be available,
> since it's intended for widespread distribution on both shared hosts
> and custom hosting. The thought we had was to do a user-space port of
> the PECL module to include in the project and rely on that. Then if
> the PECL module is installed, we don't include the library (either via
> an extension_loaded() check or just relying on autoload) and the PECL
> implementation gets used instead. Poof, nice speed boost.
>
> The questions I have are:
>
> 1) Is this even a viable approach? It seems like it, but to my
> knowledge no one else has done this to any serious extent which makes
> me wonder if there's a reason the road less traveled is less traveled.
One reason would be because it requires fixing bugs and implementing
features twice, so it effectively doubles the required work.
>
> 2) Is anyone else doing this? No sense doing it ourselves if someone
> else already is.
There's a Drupal extension that does something like this, but in reverse:
http://drupal.org/project/drupal_php_ext
Cheers,
David