in reply to opendir slower than ls on large dirs?
To explain the comparative behaviour roughly: shelling out has a fixed overhead; the ls command will have been optimised for the platform. opendir/readdir on the other hand has variable overheads, is probably not optimised for a fixed platform, so will begin cheaper but grow with the filecount to eventually overtake the fixed overhead of shelling out.
One world, one people
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: opendir slower than ls on large dirs?
by Anonymous Monk on Jul 05, 2005 at 10:18 UTC |