Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if entry is a directory once per enumerator #8177

Merged
merged 1 commit into from May 14, 2020

Conversation

ashmaroli
Copy link
Member

Summary

Because testing File.directory?(entry) for every pattern in enumerator (site.exclude and site.include) is redundant and can hamper performance.

Therefore, test entry once per enumerator and stash the result in a local variable which is tallied against enumerator's items when needed.

@ashmaroli ashmaroli requested a review from DirtyF May 14, 2020 06:48
@ashmaroli ashmaroli added this to the 4.1 milestone May 14, 2020
Copy link
Member

@DirtyF DirtyF left a comment

Choose a reason for hiding this comment

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

👍

@ashmaroli
Copy link
Member Author

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit 709e633 into jekyll:master May 14, 2020
@jekyllbot jekyllbot added the bug label May 14, 2020
jekyllbot added a commit that referenced this pull request May 14, 2020
@ashmaroli ashmaroli deleted the entry-filter-directory-check branch May 14, 2020 08:59
@jekyll jekyll deleted a comment from Teja7048 May 15, 2020
@jekyll jekyll locked and limited conversation to collaborators May 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants