2008/4/8, Michael Linfield <globyy3000 / hotmail.com>:
> Alright so I was playing with my large amounts of data and ran into yet
>  another problem with shoving it into a loop that requires a substantial
>  amount of memory.
>
>
>
>  dataArray = []
>  output = arrayOut.to_s.chop!.split(",")
>
>  output1 = output[0..356130]
>  output2 = output[356131..712260]
>  output3 = output[712261..1068390]
>  output4 = output[1068391..1424521]
>
>  count = 0
>     output1.each do |out|
>       out = out.to_i
>       push = hashRange[out]
>       dataArray << push
>       count+=1
>       puts "#{push} - #{count}"     #Testing purposes
>     end
>
>  I broke 'output' up into several blocks for other purposes than just
>  this loop, but also to see what the effect would be. As you can see
>  we're talkin about almost 1,500,000 array elements.
>  -->hashRange is a hash obviously
>
>  Problem being: that test line I added 'puts "#{push} - #{count}"'
>  solidifies the fact that it moves through 1 element every 5-6sec...
>  After doing my math thats about 86 days to finish 1,500,000 elements :(
>
>  Any ideas that would speed this up are much appreciated!! Otherwise I'll
>  be back in 3 months IF I dont get an error :D

Obviously there is a lot of code missing from the piece above.  Can
you explain, what you are trying to achieve?  What is your input file
format and what kind of transformation do you want to do on it?  I
looked through your other postings but it did not become clear to me.

Cheers

robert

-- 
use.inject do |as, often| as.you_can - without end