From: "Gerardo Santana Gómez Garrido" Date: 2008-03-07T00:59:47+09:00 Subject: Re: Too many open files on OpenBSD Sorry for top posting, Gmail doesn't support my browser. Indeed, I'm waiting for that OPENBSD_4_3_BASE tag ;-) What I meant is that you are opening a file in every call to parse. If you have many recursive calls to parse, you'll end up with many files open. As some others have suggested, you could transform recursion into iteration. On 3/6/08, Edd Barrett wrote: > Hello, > > Thanks for all the replies so far. I will later try the suggestion to > read the file into memory straight away then close the file. > > Gerardo Santana Gómez Garrido wrote: > > Hello Edd, an OpenBSD user here too. > > Great :) Ready for 4.3? > > > > > The error messages speaks of more than 3055 recursion levels. Not > > every level is a call to parse, but if you take out the #new and #each > > methods I'm sure there are a lot more than just 5 files opened at the > > same time. > > Ah i see. So each call frame is a "file" in ruby? I probably > misunderstood. > > > > > Are there that many dependencies? I don't think so. I haven't seen > > those .tlpsrc files yet. I'll take a look. > > http://tug.org/svn/texlive/trunk/Master/tlpkg/tlpsrc/ > > More than 1000 last time I checked. > > This means I will be soring a lot of strings. Is the GC in ruby > effecient, or should I be encouraging it Java style. System.gc() :P > > Thanks > > Edd > -- > Posted via http://www.ruby-forum.com/. > > -- Gerardo Santana