From: John Joyce Date: 2007-09-26T02:16:59+09:00 Subject: Re: memory use question On Sep 25, 2007, at 10:00 AM, Roger Pack wrote: > John Joyce wrote: >> On Sep 24, 2007, at 3:57 PM, Roger Pack wrote: >> >>> VmStk: 120 kB >>> Proc 146 >>> >> Why wouldn't it be? > >> >> Maybe you already are, but if you're not, you need to manage the flow >> of data in (and out) of the program. > > Yeah I think the problem is that I have the file incoming (a string), > write it to disk, then read it from disk again. So lots of random > strings kicking around. Maybe GC.start will help me :) > Thank you! > -Roger > -- > Posted via http://www.ruby-forum.com/. > Handle the data in pieces whenever possible. Take smaller bites. It may make things slower for very very small files/ data sets, but it will be more stable over larger ones.