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|
...
end
...
end
any alternatives to Dir.glob ?
Regards, Gilbert
-----Original Message-----
From: Rebhan, Gilbert [mailto:Gilbert.Rebhan / huk-coburg.de]
Sent: Monday, May 14, 2007 11:39 AM
To: ruby-talk ML
Subject: slow file access with mapped drives ?!
Hi,
running ruby 1.8.4 (2006-04-14) [i386-mswin32]
on Windows2000
i have a script that scans some directories for given filename patterns
and does string replacement in those found files.
it works fine, but when it comes to work with files on a mapped drive
the script hangs for about 20secs, afterwards does his work and all OK.
i tried with =
V:/path/to/files
and also with
//servername/c$/path/to/files
and it's both the same, no difference.
Any ideas how to speed up the file access ?
Are there general problems with unc path and ruby ?
Gilbert