-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[FileCache#Find] N to 1 calls for file matching #14351
Open
dafyddcrosby
wants to merge
5
commits into
chef:main
Choose a base branch
from
dafyddcrosby:filecache_find_dirglob
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dafyddcrosby
force-pushed
the
filecache_find_dirglob
branch
from
April 23, 2024 21:28
76490a7
to
0acda49
Compare
dafyddcrosby
changed the title
[FileCache#Find] Use Dir.glob with path instead of doing regexes
[FileCache#Find] N to 1 calls for regex matching
Apr 23, 2024
dafyddcrosby
force-pushed
the
filecache_find_dirglob
branch
2 times, most recently
from
April 23, 2024 22:34
4093aac
to
d65551e
Compare
dafyddcrosby
force-pushed
the
filecache_find_dirglob
branch
2 times, most recently
from
May 13, 2024 18:03
b421935
to
9a2c309
Compare
dafyddcrosby
changed the title
[FileCache#Find] N to 1 calls for regex matching
[FileCache#Find] N to 1 calls for file matching
May 13, 2024
dafyddcrosby
force-pushed
the
filecache_find_dirglob
branch
4 times, most recently
from
May 17, 2024 16:24
f48c75d
to
5701d39
Compare
jaymzh
approved these changes
May 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this... but lets comment this method
tpowell-progress
added
the
Status: Waiting on Contributor
A pull request that has unresolved requested actions from the author.
label
May 21, 2024
dafyddcrosby
force-pushed
the
filecache_find_dirglob
branch
from
May 21, 2024 23:31
5701d39
to
7f821bb
Compare
tpowell-progress
added
Status: Waiting for Build Fix
and removed
Status: Waiting on Contributor
A pull request that has unresolved requested actions from the author.
labels
May 21, 2024
tpowell-progress
approved these changes
May 21, 2024
Signed-off-by: David Crosby <dcrosby@fb.com>
Signed-off-by: David Crosby <dcrosby@fb.com>
Instead of holding the reference to files the whole loop, use until and take the head from the array Signed-off-by: David Crosby <dcrosby@fb.com>
Signed-off-by: David Crosby <dcrosby@fb.com>
The regular expression's capture is changed so that instead of capturing the tail of the file string (ie cache path excluded), we capture the cache path instead so that we can use delete_prefix calls to mutate the strings directly, saving on allocations Signed-off-by: David Crosby <dcrosby@fb.com>
dafyddcrosby
force-pushed
the
filecache_find_dirglob
branch
from
June 7, 2024 17:08
7f821bb
to
e5a46f8
Compare
Quality Gate passedIssues Measures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This moves pre-computable values from the inner loop of
#find
to outside of the loop.Types of changes
Checklist:
Gemfile.lock
has changed, I have used--conservative
to do it and included the full output in the Description above.