! checking if each match found is either a file or folder appears to …#1850
! checking if each match found is either a file or folder appears to …#1850mihaisebea wants to merge 2 commits intopremake:masterfrom
Conversation
…be expensive on large projects (at least on windows) ! for a 5k files project GetAttributesW takes around 20% of the time
|
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.
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.
In addition the comment is not meaningful outside of the pull request.
| results = table.join(results, os.match(path.join(matchpath, after), matchType)) | ||
| else | ||
| table.insert(results, matchpath) | ||
| if matchType == "file" and os.matchisfile(m) then |
There was a problem hiding this comment.
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.
os.matchisfile takes a match context, which is m here, so this isn't a typo.
There was a problem hiding this comment.
That's not how not (A and B) works, either A or B can be false.
|
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 #XXXXin 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!