Skip to content

Don't recursively walk local-only dirs with NO_DELETE#120

Open
Mr-Pine wants to merge 1 commit intoGarmelon:masterfrom
Mr-Pine:no-delete-dirs
Open

Don't recursively walk local-only dirs with NO_DELETE#120
Mr-Pine wants to merge 1 commit intoGarmelon:masterfrom
Mr-Pine:no-delete-dirs

Conversation

@Mr-Pine
Copy link
Contributor

@Mr-Pine Mr-Pine commented Jun 8, 2025

This PR consolidates not deleted reports/log messages for whole directories that are only available locally. This avoids the performance impact of recursively looking at local-only directories with a lot of files (for example venvs)

return path in self.marked

def contains_marked(self, path: PurePath) -> bool:
return any(marked_file.is_relative_to(path) for marked_file in self.marked)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mark the parents and do not build an n² algo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants