-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlib
Description
pathlib.Path.glob()
currently generates Path
objects for intermediate paths that might never be yielded to the user, which is slow and unnecessary. For example, a pattern like **/*.mp3
is evaluated by creating a Path
object for every directory visited.
There are already few tricks employed to avoid instantiation, but it would be better if only real results were converted to path objects.
Linked PRs
erlend-aasland
Metadata
Metadata
Assignees
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-pathlib