[Nitro] [PATCH] parse_multipart test case
rob at motionpath.com
Fri Jan 20 05:09:39 EST 2006
Here is a test case for parse_multipart. I made this because I have
created a new parse_multipart method that theoretically should only use
20k of RAM at once but in practise even if I force GC.start ruby will
not deallocate the memory while receiving very large files :(
I would submit this patch too, but I have since thought of a much saner
way to do it.
One thing I did implement is a progress report of the POST upload stored
in session[:upload_progress] containing the start time, the content
length and the amount of bytes read. When the POST was finished it also
set :finished to Time.now too so you can do things like progress bars.
I am not happy to submit this patch as it uses a lot more CPU than it
should and could have been implemented a lot more simplistically and I
would be happy to describe a better method if anyone was game for coding
it but I cannot at present code it myself as the replacement method I
wrote works for us.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12450 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060120/e2c54261/attachment.bin
More information about the Nitro-general