Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Finder] Add early directory prunning filter support#50877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@mvorisek
Copy link
Contributor

@mvorisekmvorisek commentedJul 4, 2023
edited
Loading

QA
Branch?6.4
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PRsymfony/symfony-docs#18499

Filtering terminology first:

  • "exclude" - whole filesystem subtree is traversed, directories (and files) are excluded after, slow
  • "prune" - pruned directories are not traversed, fast

Currently there is early directory prunning support possible, but with string patterns only, not even full regex is supported as the input is always quoted -https://github.com/symfony/symfony/blob/v6.2.12/src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php#L45.

This PR adds early directory prunning with full callback support.

Tested with VFS to assert the pruned directories are really not traversed and the count of IO syscalls is minimal.

@carsonbotcarsonbot added this to the6.4 milestoneJul 4, 2023
@mvorisekmvorisekforce-pushed thefinder_exclude_by_callback branch 6 times, most recently from0117bc0 to2cb6ad5CompareJuly 4, 2023 16:56
@mvorisekmvorisek changed the titleAdd file finder early directory prunning filter support[Finder] Add early directory prunning filter supportJul 4, 2023
@mvorisekmvorisekforce-pushed thefinder_exclude_by_callback branch from2cb6ad5 toc47a9b8CompareJuly 6, 2023 08:38
@mvorisekmvorisekforce-pushed thefinder_exclude_by_callback branch 4 times, most recently from74945e2 tob5dd592CompareJuly 12, 2023 21:16
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Can you expand a bit on the PR description to say what pruning is about in the context of the Finder component? It would help ppl get what this is about more quickly I think.

@mvorisekmvorisekforce-pushed thefinder_exclude_by_callback branch 2 times, most recently from2cdcbf7 to4864beaCompareJuly 13, 2023 15:45
@mvorisekmvorisekforce-pushed thefinder_exclude_by_callback branch from4864bea to6cdfe93CompareJuly 13, 2023 15:50
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

LGTM, please just use a regular@param annotation for the added argument.

@carsonbotcarsonbot changed the title[Finder] Add early directory prunning filter supportAdd early directory prunning filter supportJul 13, 2023
@mvorisekmvorisekforce-pushed thefinder_exclude_by_callback branch from45d034d tobaca842CompareJuly 13, 2023 22:17
@mvorisekmvorisek changed the titleAdd early directory prunning filter support[Finder] Add early directory prunning filter supportJul 29, 2023
@fabpot
Copy link
Member

@mvorisek Can you rebase to resolve the conflicts?

@nicolas-grekas
Copy link
Member

Thank you@mvorisek.

@nicolas-grekasnicolas-grekas merged commitc868be4 intosymfony:6.4Oct 11, 2023
@mvorisekmvorisek deleted the finder_exclude_by_callback branchOctober 11, 2023 18:08
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestOct 16, 2023
…er support (mvorisek)This PR was merged into the 6.4 branch.Discussion----------[Finder] [Finder docs] Add early directory prunning filter supportRefs*symfony/symfony#50877Commits-------4b08ee6 [Finder docs] Add early directory prunning filter support
This was referencedOct 21, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

4 participants

@mvorisek@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp