Skip to content

Performance of OSFS removetree #428

Open
@geoffjukes

Description

@geoffjukes

I wrapped my removetree call to include a hassyspath check, and use shutil.rmtree if it it does.

I think I can add this to base.py after the lock here: https://github.com/PyFilesystem/pyfilesystem2/blob/fs/base.py#L1223

The speed improvement for the large-ish directory I tested on, was 4.5s down to ~3s. I'll submit a PR in case it's useful.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions