From: Alex Maccaw Date: 2008-01-08T22:18:28+09:00 Subject: Re: Finding the first file in a dir, fast, for message queue > You find 5ms when accessing the file system long? I'd say that's > pretty fast considering what you do (recursive search). I doubt you > will get much improvement as long as you always access the file system > for your search. If you know the change frequency of files then you > could store file system contents in memory and only update every n > seconds / minutes or whatever or have a background thread that > continuously updates your in memory representation. Well, it's long compared to generating folder names, a guid, and writing files. It means that I can publish about 1000 msgs per second on to my queue, but only pull of 243 msgs per second. -- Posted via http://www.ruby-forum.com/.