Serhiy Storchaka added the comment:

> But using FDs proportional to the tree depth seems reasonable to me.

This was the main reason for rejecting issue15200. May be we can allow this for 
globbing, but only explicitly enabled with special parameter or separate 
functions. The benefit for globbing is starting to yield results without 
internal caching. The benefit for os.walk() is smaller, because in any case it 
yields files and directories not one-by-one, but collected into lists.

> Is there a potential hybrid strategy, where for small directories we close
> the FD but for large directories we keep it open?

May be with more complicated code. I think this needs explicit close() method, 
so it can go only in 3.6. For now I think we have to commit one of my patches 
(the difference only stylistic).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25995>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to