Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Sort files by oldest timestamp

by pelagic (Priest)
on Oct 29, 2009 at 15:31 UTC ( #803972=note: print w/replies, xml ) Need Help??


in reply to Re: Sort files by oldest timestamp
in thread Sort files by oldest timestamp

ok, ok, I know, it's way old but I can't resist to say this:
Your code does the LOOP as many times as there are files in the srcdir and it does a stat for ever file in srcdir in every LOOP as long as the file has not been moved yet (i.e. n! with n files). So if you have very many files in your srcdir, let's say 1,000,000 or so you will have a lot of unnecessary overhead.

pelagic

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803972]
help
Chatterbox?
[karlgoethebier]: shmem: yes. my first ride tomorrow is questionable because of lumbago. shit
[shmem]: But! the bloke wasn't me, at least.
[shmem]: karlgoethebier: isn't bike riding a way of fixing lumbago?
[karlgoethebier]: shmem: scheiss technik
[karlgoethebier]: shmem: yes - i f you manage it to get on the bike. and pray if you must stop...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2017-06-25 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (570 votes). Check out past polls.