Re: PHP CLI & Forking children



qwertycat@xxxxxxxxxxxxxx wrote:
On Sep 29, 8:32 pm, qwerty...@xxxxxxxxxxxxxx wrote:
Instead of writing a PHP script that downloads 2 million headers from
a newsgroup in a single connection (which will cause PHP to crash
anyway as it'll reach 500MB+ memory usage), I thought it would be
better to launch 4 processes do download it in chunks of 50,000
headers - with 4 connections to the same NNTP server.

I admit I should be using Perl or C for these tasks, but I know PHP
and I'm used to using its functions.


Nothing wrong with using PHP for this. It will be slower than a compiled language like C, but most of your time will be spent waiting on I/O anyway. So it shouldn't be that much slower.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: PHP CLI & Forking children
    ... a newsgroup in a single connection (which will cause PHP to crash ... anyway as it'll reach 500MB+ memory usage), ... I admit I should be using Perl or C for these tasks, but I know PHP ...
    (comp.lang.php)
  • Is PHP still slower than Perl?
    ... A benchmark in 2002 showed PHP is much slower in shell or when Apache has ... With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice. ... Perl is around. ...
    (comp.lang.perl.misc)
  • Is PHP still slower than Perl?
    ... A benchmark in 2002 showed PHP is much slower in shell or when Apache has ... With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice. ... Perl is around. ...
    (comp.lang.php)
  • Re: PHP global namespace clogged up
    ... PHP ADOdb and is slower than other similar applications (vide: ... Zend Accelerator. ... Pure php code without added accelerators is slow when you ...
    (comp.lang.php)
  • Re: performance modifications
    ... line and it was very slow when called as a cgi via apache. ... Much slower than ... Is there something that needs to be done in order for Apache to run C ... |> is that PHP brings down the speed of everything. ...
    (freebsd-performance)