diff options
author | Barney Gale <barney.gale@gmail.com> | 2023-05-07 21:12:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 21:12:50 (GMT) |
commit | c0ece3dc9791694e960952ba74070efaaa79a676 (patch) | |
tree | 17d6baebf2f6a39e129b7e74da2ab56a029e8d16 /Python/flowgraph.c | |
parent | 8d95012c95988dc517db6e09348aab996868699c (diff) | |
download | cpython-c0ece3dc9791694e960952ba74070efaaa79a676.zip cpython-c0ece3dc9791694e960952ba74070efaaa79a676.tar.gz cpython-c0ece3dc9791694e960952ba74070efaaa79a676.tar.bz2 |
GH-102613: Improve performance of `pathlib.Path.rglob()` (GH-104244)
Stop de-duplicating results in `_RecursiveWildcardSelector`. A new
`_DoubleRecursiveWildcardSelector` class is introduced which performs
de-duplication, but this is used _only_ for patterns with multiple
non-adjacent `**` segments, such as `path.glob('**/foo/**')`. By avoiding
the use of a set, `PurePath.__hash__()` is not called, and so paths do not
need to be stringified and case-normalised.
Also merge adjacent '**' segments in patterns.
Diffstat (limited to 'Python/flowgraph.c')
0 files changed, 0 insertions, 0 deletions