You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
Listing all ignored files to later filter out those can have a big impact when we have some ignored folder with many files.
Maybe we should call ls-tree to obtain the file list:
Having git list all untracked files (41k) to later filter the files from the repo was a bad idea (my bad).
Does calling git ls-tree -r HEAD --name-only to get the name of the tracked files plus parsing the output of git status --untracked-files=all to get the untracked files letting git it self filter out the ignored files a good approach?
The text was updated successfully, but these errors were encountered:
prusse-martin
changed the title
Performace problem when many ignored files are present in thje repo
Performace problem when many ignored files are present in the repo
Jan 29, 2021
Having git list all untracked files (41k) to later filter the files from the repo was a bad idea (my bad).
Can you post some timings as well? I wouldn't think listing 41k files would take too long (we're talking minutes if I recall our discussion in RC).
Does calling git ls-tree -r HEAD --name-only to get the name of the tracked files plus parsing the output of git status --untracked-files=all to get the untracked files letting git it self filter out the ignored files a good approach?
Not sure, why would that be faster? I mean currently we do a single git call (#59), you think is the parsing of that output that is showing a slowdown?
@ggrbill was having a 20min delay when executing that one single call ( git status --ignored --untracked-files=all --porcelain=2), his ignored "tmp" folder had over 2GB and the file count was well over 4 000 000 000.
Asking git to list will allow it to better handle the "ignored" files.
Related to #58
Listing all ignored files to later filter out those can have a big impact when we have some ignored folder with many files.
Maybe we should call
ls-tree
to obtain the file list:In my local machine:
Having git list all untracked files (41k) to later filter the files from the repo was a bad idea (my bad).
Does calling
git ls-tree -r HEAD --name-only
to get the name of the tracked files plus parsing the output ofgit status --untracked-files=all
to get the untracked files letting git it self filter out the ignored files a good approach?The text was updated successfully, but these errors were encountered: