2010/7/24 Tomasz Wegrzanowski <redmine / ruby-lang.org>:
> 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