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
feat(git): Use fs instead of git for file listing #7277
Conversation
lib/util/git/index.ts
Outdated
return []; | ||
} | ||
const [submodules, files]: [string[], Dirent[]] = await Promise.all([ | ||
getSubmodules(), |
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.
Is this in case submodules are not initialised?
@zharinov can you find a large repo to test this out on? I'd like to make sure it runs as fast or faster than the existing git approach. |
lib/util/git/index.ts
Outdated
|
||
const files = (await fs.readdir(directory)).filter((file) => | ||
excludes.every( | ||
(exclude) => file !== exclude && !file.startsWith(`${exclude}/`) |
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 have a doubt in my code now. This may not filter correctly is the submodule is nested deeper than the top level directory
Do we still need this, or #7349 gives us good enough performance? |
We should still do this |
In my machine, concurrency with queue size 2 worked faster, while increased size made no difference because of recursion. |
I had assumed that an fs-based file listing would be more efficient than a |
No description provided.