Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52289 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80926 invoked from network); 11 May 2011 11:04:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2011 11:04:58 -0000 Authentication-Results: pb1.pair.com header.from=mail_ben_schmidt@yahoo.com.au; sender-id=unknown; domainkeys=good Authentication-Results: pb1.pair.com smtp.mail=mail_ben_schmidt@yahoo.com.au; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain yahoo.com.au from 98.139.91.210 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: mail_ben_schmidt@yahoo.com.au X-Host-Fingerprint: 98.139.91.210 nm16-vm0.bullet.mail.sp2.yahoo.com Received: from [98.139.91.210] ([98.139.91.210:46235] helo=nm16-vm0.bullet.mail.sp2.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/D5-45512-85D6ACD4 for ; Wed, 11 May 2011 07:04:56 -0400 Received: from [98.139.91.62] by nm16.bullet.mail.sp2.yahoo.com with NNFMP; 11 May 2011 11:04:53 -0000 Received: from [98.139.91.43] by tm2.bullet.mail.sp2.yahoo.com with NNFMP; 11 May 2011 11:04:53 -0000 Received: from [127.0.0.1] by omp1043.mail.sp2.yahoo.com with NNFMP; 11 May 2011 11:04:53 -0000 X-Yahoo-Newman-Id: 633227.16193.bm@omp1043.mail.sp2.yahoo.com Received: (qmail 87377 invoked from network); 11 May 2011 11:04:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=qxxCDrt0XClQnKjI/YvUtKnvDCtNn9OC1McFTz51e1S9lPfalilK50TABVCgVvHN4xXrxOe/TpwDk7VsZis4pF639RXbuEbKo58bUgQCp/oboJxslUK3bNDHmFg57vn/vmlzWmf7ncB7DJmw1CM4IAcWaZEouR+n1Wwabd2BFMA= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s1024; t=1305111893; bh=jpHZtquvnNdRHPc8hr8gJ8INKPYjRiu7FebcUR1oLR8=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=5Ib4nLPpSTd8vICOaszKHngM1LNpqWZX6tIyAlLYgWONmKtD5+bFReLuZjWPxeWUvZHemjzZRJMtPJwzvkT1XVzVXH/QxKVN4apC4/0jjksJlBa3M1tTO1pNiceNOjFhP5Ye3R9puzMNbrqhT2qujSkIJq9vZGkHBv8GihrUqEw= Received: from thought.local (mail_ben_schmidt@124.170.13.172 with plain) by smtp130.mail.mud.yahoo.com with SMTP; 11 May 2011 04:04:52 -0700 PDT X-Yahoo-SMTP: enFMnPSswBAexaHyzgobwuUTrYOhZdJ0KRA2SjA- X-YMail-OSG: VM2zbnEVM1kaaZAaGJpFGwmJBZjPWBSpaDsziJaCK4wVK94 h9b2IIRAOfIq8JP5qNETsAQSqm1nyr0KY2phjZosE3DV7WMHA_oG2ln4i0ft mnTibKoirXcsbWGCFbs_B3iDicF0WJOwtV86iFwOYgKK9LxMST5jTV5EbKm. pCV5AUOYQwQUHiPk0aCOV.Il5UO7F6BxBUP3szIP9j7rBj2w_go2QUTHUWMT MiTNS6LMrnK2sdGrho3ZKtt3ZObo1H5cYUc_ADcqjxbI635XM5tPC1LDiuCf xI9r2hnkO3W7tXH3LbZNuINokWmoky3TSopUUverH9oxh39P8cl9ihDbnvjf S6uX7x8TgR58Mqb22ChwGefg- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4DCA6D51.5050303@yahoo.com.au> Date: Wed, 11 May 2011 21:04:49 +1000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: Rasmus Lerdorf CC: Gabriel Sosa , "internals@lists.php.net" References: <4DCA0845.1020506@lerdorf.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] making system calls from a php extension From: mail_ben_schmidt@yahoo.com.au (Ben Schmidt) On 11/05/11 2:33 PM, Rasmus Lerdorf wrote: > On May 10, 2011, at 21:01, Gabriel Sosa wrote: >> I'm basically using lynx to convert some html into plain text >> >> basically replicating the following command: >> >> *lynx -pseudo_inlines=off -hiddenlinks=merge -reload -cache=0 -notitle >> -force_html -dump -nocolor -stdin* >> >> I've been looking but I didn't find any other library capable to do >> the same with "almost" the same quality. >> > You may be right that it does it better than other mechanisms and it > may be the way to go. But it sounds like you need it to be faster. You > are still not going to gain much simply by calling lynx from C. The > only way to speed this up is to not have to fork and exec a new > process on every request. One way to do that would be to figure out > how to talk to an already running instance of lynx. Then write a > little Gearman wrapper for them and launch a bunch of Gearman workers. > Another benefit of this approach is that you will be able call lynx > asynchronously. Rasmus is spot on, but another thought is that if your content is often the same, caching it somehow (either with PHP code or with a PHP extension--I would just try PHP code for starters) could yield large speed-ups, too. Ben.