You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
glob('*.txt') is much slower than it should be on zip files with many recursive files.
This is because it uses ._descendants() (which lists all recursive descendants) when there's no need, as this glob should only need to read the top-level .iterdir():
For large zip files, this can easily make a 1000x speed difference, which is surprising when you're writing code that aims to work on both pathlib.Path and zipfile.Path.
glob('*.txt')
is much slower than it should be on zip files with many recursive files.This is because it uses
._descendants()
(which lists all recursive descendants) when there's no need, as this glob should only need to read the top-level.iterdir()
:zipp/zipp/__init__.py
Line 373 in ee6d711
For large zip files, this can easily make a 1000x speed difference, which is surprising when you're writing code that aims to work on both
pathlib.Path
andzipfile.Path
.Originally posted by @nh2 in #98 (comment)
The text was updated successfully, but these errors were encountered: