This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benhoyt, brett.cannon, ethan.furman, gvanrossum, pitrou, serhiy.storchaka, vstinner
Date 2016-01-11.12:20:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452514821.4.0.115798593828.issue26032@psf.upfronthosting.co.za>
In-reply-to
Content
Proposed minimal patch implements globbing in pathlib using os.scandir(). Here are results of microbenchmarks:

$ ./python -m timeit -s "from pathlib import Path; p = Path()" -- "list(p.glob('**/*'))"
Unpatched: 598 msec per loop
Patched:   372 msec per loop

$ ./python -m timeit -s "from pathlib import Path; p = Path('/usr/')" -- "list(p.glob('lib*/**/*'))"
Unpatched: 1.33 sec per loop
Patched:   804 msec per loop

$ ./python -m timeit -s "from pathlib import Path; p = Path('/usr/')" -- "list(p.glob('lib*/**/'))"
Unpatched: 750 msec per loop
Patched:   180 msec per loop

See msg257954 in issue25596 for comparison with the glob module.
History
Date User Action Args
2016-01-11 12:20:21serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, brett.cannon, pitrou, vstinner, benhoyt, ethan.furman
2016-01-11 12:20:21serhiy.storchakasetmessageid: <1452514821.4.0.115798593828.issue26032@psf.upfronthosting.co.za>
2016-01-11 12:20:21serhiy.storchakalinkissue26032 messages
2016-01-11 12:20:21serhiy.storchakacreate