On 08.05.2011 04:16, 7stud -- wrote: > Bobby S. wrote in post #997304: >> The threading made no deference in speed at all not what I expected. >> > > Ok, that is what I expected. To truly do two things at once in ruby, > you have to create multiple processes. So you need to read up on > fork(). It's questionable whether that will yield any benefit since it's likely not CPU what's making it slow but rather IO. Depending on the file system there might be some locking on the directory involved when renaming. In any case a FS needs to take measures to not make disk contents inconsistent in case there are multiple concurrent writes to a directory. That's where the bottleneck likely lies. I don't think that doing the rename concurrently will give any improvements. I would just do it sequentially or at least not with so many threads (at most 2). I don't think it's worth going through that hassle. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/