From: Kevin Smith Date: 2001-02-14T00:45:25+09:00 Subject: [ruby-talk:10786] Re: perform. of Dir["**/*"] Richard Hensh wrote: >Now that someone has straightened me out on the use of **, I have a >performance question. Running the following script on my C: drive took about >497 seconds. The drive contains 32701 files. Is this slow? > >def testme > a = Time.now > puts Dir["**/*"].length > b = Time.now > puts b-a >end Well, you're printing out 64 filenames per second, which seems reasonable, since video output is notoriously slow. Try either not puts'ing the results, or redirecting the output to a file to see if it speeds up dramatically. Kevin