From: Tanaka Akira Date: 2010-07-29T17:44:15+09:00 Subject: [ruby-core:31530] Re: [Feature #3608] Enhancing Pathname#each_child to be lazy 2010/7/24 Tomasz Wegrzanowski : > Feature #3608: Enhancing Pathname#each_child to be lazy > http://redmine.ruby-lang.org/issues/show/3608 > Right now it lists entire directory, then yields > every element, that is x.each_child(&b) means x.children.each(&b). > > This is too slow for directories mounted over networked file systems etc., > and there is currently no way to get lazy behaviour, other than leaving > convenient #each_child/#children API and moving to lower level. A problem of the lazy behaviour that is it opens a file descriptor when the block is called. If the lazy each_child is used for recursively, the limit of number of descriptors limits the recursive levels. I'm not sure which problem is important. -- Tanaka Akira