# Way of handling slow upload processing

**URL:** <https://www.ruby-forum.com/t/way-of-handling-slow-upload-processing/145461>\
**Category:** Rails\
**Created:** [August 10, 2008, 3:27am UTC](https://www.ruby-forum.com/t/way-of-handling-slow-upload-processing/145461 "2008-08-10T03:27:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@ron](https://www.ruby-forum.com/u/ron)\
**Post date:** [August 10, 2008, 3:27am UTC](https://www.ruby-forum.com/t/way-of-handling-slow-upload-processing/145461/1 "2008-08-10T03:27:44Z")

</div>

Hi,

I’ve written code to upload files a la Agile Web D. with  
Rails Second edition. The thing is, its awfully slow.

In my tests, I was processing an uploaded image using RMagick. My new  
project doesn’t require me to process image files–it just needs Ruby  
to process the file and save it to the server. The trouble is there  
could be a large number of files.

So my question is, is Ruby viable to use in this context? There are  
significant advantages to writing most of the site in Ruby, except for  
this part. Is it possible to write the file processing script in  
another, faster language and have Ruby hand over the file processing  
and saving to that script?

Ron

---

<div class="post-metadata">

**Author:** ![ron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@ron](https://www.ruby-forum.com/u/ron)\
**Post date:** [August 10, 2008, 4:16am UTC](https://www.ruby-forum.com/t/way-of-handling-slow-upload-processing/145461/2 "2008-08-10T04:16:56Z")

</div>

Ron wrote:

> Hi,
> 
> I’ve written code to upload files a la Agile Web D. with  
> Rails Second edition. The thing is, its awfully slow.
> 
> In my tests, I was processing an uploaded image using RMagick. My new  
> project doesn’t require me to process image files–it just needs Ruby  
> to process the file and save it to the server. The trouble is there  
> could be a large number of files.
> 
> So my question is, is Ruby viable to use in this context? There are  
> significant advantages to writing most of the site in Ruby, except for  
> this part. Is it possible to write the file processing script in  
> another, faster language and have Ruby hand over the file processing  
> and saving to that script?
> 
> Ron

Hi Ron,  
Do you use nginx?  
Ezra Z. did a post on an nginx module for file uploads:  
[http://brainspl.at/articles/2008/07/20/nginx-upload-module](http://brainspl.at/articles/2008/07/20/nginx-upload-module)  
courtesy of Valery K. who wrote the module:  
[http://www.grid.net.ru/nginx/upload.en.html](http://www.grid.net.ru/nginx/upload.en.html)  
.

Daniel
