From: Luc Evers Date: 2009-01-19T17:39:36+09:00 Subject: Re: FileUtils.cp_r is slow? ------=_Part_7065_27387707.1232354427168 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline For file backup I'm using rsync on a Linux system, its possible to start this tool from Ruby. Rsync copy the difference between the files and is very fast. I don't now rsync exist in Windows (maybe Powershell), but its possible to run on windows via Cygwin. Luc. On Mon, Jan 19, 2009 at 8:33 AM, Robert Klemme wrote: > 2009/1/17 Paul Lynch : > > > On Wed, Jan 14, 2009 at 12:45 PM, Paul Lynch > wrote: > > > >> I wrote a ruby script to backup files from my hard drive to my flash > >> drive. For some reason, with one of my flash drives, copying files > >> with FileUtils.cp_r is about 250 times slower than if I drag and drop > >> the files from one drive to the other in Windows. I'm suspecting a > >> buffer size problem. Is there a way to control the buffer size cp_r > >> selects? If not, what alternatives are there to FileUtils.cp_r? (I > >> am about to try writing my own, but someone must already have a > >> solution....) > > Just another idea: if your files reside on two different physical > disks you might get a benefit from separating reading and writing into > two different threads. > > Kind regards > > robert > > > -- > remember.guy do |as, often| as.you_can - without end > > ------=_Part_7065_27387707.1232354427168--