Re: making system calls from a php extension

From: Date: Wed, 11 May 2011 03:53:41 +0000
Subject: Re: making system calls from a php extension
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-52266@lists.php.net to get a copy of this message
On 05/10/2011 08:42 PM, Gabriel Sosa wrote:
hello everyone! I'm trying to gain some speed by moving a function from PHP legacy code to C and making an extension. I'm trying to call *lynx* from the command line since their C api isn't something soo nice likely to use it as any other libXX
If it were me I would take a step back and look at what lynx was actually needed for and whether there are other libraries out there that can do similar things. Like libcurl + the html parsing available in libxml2, for example. I'm assuming you are calling lynx in order to use its html parser? Moving something from PHP to C for performance reasons, but leaving in the call to an external program isn't going to buy you much, if anything, since most of your time is spent forking and launching that external program on each request. -Rasmus

« previous php.internals (#52266) next »