in reply to handler performance question

I'd suspect the main slowdown is the system("mkdir ...") call. Assuming you have significantly less than 5 million car manufacturers you'd probably be better off

a) testing if the directory exists before attempting to create it

b) using the perl built-in mkdir command

c) cache this info. IOW, don't try to recreate a directory you've already created before. The difference between system and mkdir and stat is quite vast, but in this situation it completely dwarfed by the sheer amount of unnecessary calls you'd make. update: this is the important suggestion. you can ignore the rest for this particular problem.

Replies are listed 'Best First'.
Re^2: handler performance question
by ikegami (Patriarch) on Feb 04, 2009 at 03:02 UTC

    using the perl built-in mkdir command

    The Perl equivalent of mkdir -p is mkpath if you don't want to do the chain of mkdir commands. On the other hand, I don't see why -p is needed on any but the first call.