Ruby Dir.glob on windows very long

  glob, ruby, windows

On a Sketchup extension I use

Dir.glob(File.join(folder,"/**/*.skp"))

On mac OSX, its take less than 1 second to list all Sketchup files.
On Windows and with the same library, it’s take 30 secondes to list all the file.

We try alternative to Dir.glob like Find.find, IO.popen(“find . -name ‘#{path}’”).each { |path| parse(path.chomp) } but nothing fast as Dir.glob on mac.

Do you have any advice, walk-around, tips, tricks ?

Source: Windows Questions

LEAVE A COMMENT