-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
! checking if each match found is either a file or folder appears to … #1850
base: master
Are you sure you want to change the base?
Conversation
…be expensive on large projects (at least on windows) ! for a 5k files project GetAttributesW takes around 20% of the time
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.
LGTM.
Noticed the tests fail on non-Windows platforms, it fails on |
! fix indeting
I noticed and it has been puzzling me for a while :( |
table.insert(results, matchpath) | ||
elseif matchType == "folder" and not os.matchisfile(m) then | ||
table.insert(results, matchpath) | ||
else -- keep previous behaviour |
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 just realised it's this here, it needs to check that matchType == nil
or something, otherwise all folders when matching files are picked up, and all files when matching folders are picked up.
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.
In addition the comment is not meaningful outside of the pull request.
else | ||
table.insert(results, matchpath) | ||
if matchType == "file" and os.matchisfile(m) then |
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.
typo? for below too
if matchType == "file" and os.matchisfile(m) then | |
if matchType == "file" and os.matchisfile(matchpath) then |
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.
os.matchisfile
takes a match context, which is m
here, so this isn't a typo.
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.
That's not how not (A and B)
works, either A
or B
can be false.
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.
Oops, indeed, misread.
Just wanted to poke this and see if there's a status on it since there are changes requested. |
…be expensive on large projects (at least on windows)
! for a 5k files project GetAttributesW takes around 20% of the time
What does this PR do?
Thanks for the contribution! Please provide a concise description of the problem this request solves.
How does this PR change Premake's behavior?
Are there any breaking changes? Will any existing behavior change?
Anything else we should know?
Add any other context about your changes here.
Did you check all the boxes?
closes #XXXX
in comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!