Message351736
Any optimization can be accepted only when we have any prove that the change actually has measurable effect, and that it is large enough.
Avoiding calling list() on the output of scandir() may be not harmless. For example it will left open a file descriptor. This can cause issues if walk a deep tree, especially if do this in few threads simultaneously. list() guaranties that it is open in very limited time (although using a context manager is desirable). |
|
Date |
User |
Action |
Args |
2019-09-10 18:20:11 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, gregory.p.smith, pitrou, hongweipeng, Shai |
2019-09-10 18:20:11 | serhiy.storchaka | set | messageid: <1568139611.06.0.510037180703.issue37935@roundup.psfhosted.org> |
2019-09-10 18:20:11 | serhiy.storchaka | link | issue37935 messages |
2019-09-10 18:20:10 | serhiy.storchaka | create | |
|