On 14.05.2007 12:05, Rebhan, Gilbert wrote:
>  
> Hi,
> 
> after some irb it shows the bottleneck lies in
> the Dir.glob method
> 
> i do something like =
> 
> config['targetdirs'].each do |dir|
> 
>    Dir.chdir("//servername/c$/targetdir")
>    Dir.glob("**/"<<config['targetfilepattern']).each do |file|

Why don't you just do

Dir.glob("//servername/c$/targetdir/**/"<<config['targetfilepattern']).each 
do |file|

Btw, I don't see any reference to block variable "dir" is this on purpose?

>    ...
>   end
> ..
> end
> 
> 
> any alternatives to Dir.glob ?

Find.find - but don't expect that it's faster because the slowness lies 
in file system accesses.  Network drives are inherently slower than 
local disks.

Kind regards

	robert