GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Path.rglob performance issues in deeply nested directories compared to glob.glob(recursive=True) · Issue #102613 · python/cpython Closed Labels performancePerformance or resource usagePerformance or resource usagetopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportPathlib.rglob can be orders of magnitudes slower than With a 1000-deep nested directory, import glob import os from pathlib import Path x = "" for _ in range(1000): x += "a/" os.mkdir(x) # ~ 0.5s print(glob.glob("**/*", recursive=True)) # ~ 87s print(list(Path(".").rglob("**/*"))) Linked PRs
Reacted by Barney Gale Activity
MetadataMetadataAssigneesLabelsperformancePerformance or resource usagePerformance or resource usagetopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |