Marty Anstey <marty.ans...@sunwave.net> writes:

> Max Gribov wrote:
>> On 04/06/2010 01:17 PM, Marty Anstey wrote:
>>> Nick Hilliard wrote:
>>>   
>>>> "PHP stinks on the command line and text processing"
>>>
>>> This is a bit of a broad sweeping statement! Can you elaborate on what
>>> your definition of how PHP "stinks" in this context?
>>    
>> well, try to parse ~60mb csv file doing some simple tweaks to the
>> input and then insert it into the database, and watch how much ram
>> your script will use, as well as how long it will take vs perl..
>> for me, it takes about 5 hours and eats up to 1gb of ram (configured
>> memory limit for php for me)
>
> While I appreciate where you're coming from, I've never had that issue.
> It sounds like you're trying to load the entire script into RAM and then
> parse it. Regardless of the language you are using, you'll still
> essentially get the same result.

As it happens, the loadup script I wrote that parses ARIN bulk whois
dump data and loads it into an SQL database is both written in PHP and
about an order of magnitude faster than its predecessor which was
written by someone else in perl.

Helps that I knew enough to LOCK TABLES...  :-)

-r



Reply via email to