Hello fellow Rubyists!
I’m trying to impress my boss and co-workers with Ruby so we
hopefully can start to use it in work more often. I was given
the task with moving a large repository of images from one
source to the next. The repository consists of around 1.750.000
images and requires around 350GB of space.
I though this would be no match for Ruby!
Even though it proved no match for Ruby it was a large match for me. =)
I have attached the source code with this post.
Please be gentle on me, I’m quite new to Ruby. =D
So far I have run test on my local machine and it took around 47s to
copy 4.211 items. calculating With this speed it would take around
13H to copy the whole repository. That’s a lot of time.
If I present this to my co-workers I know they will instantly blame Ruby
for this, even though I am the one to blame.
My question is this: How do I speed up my application?
I reused my filehandler and skipped the printing to the console,
but it is still taking time.
Also if any one has any previous experience of handling this many files
any kind of tips are welcome. I’m quite worried that the array
the path to all the files will flood the stack.
Thanks in advance and my regards.