Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Performace problem when many ignored files are present in the repo #61

Description

@prusse-martin

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:

W:\alfasim\Projects\alfasim\alfasim_gui (fb-ASIM-3738-transient-input -> origin/current)
(_alfasim_gui-win64-py36) λ git ls-tree -r HEAD --name-only | head -n 15
.coveragerc
.project
.pydevproject
.vscode/launch.json
.vscode/settings.json
.vscode/tasks.json
alfasim_gui.spec.yml
dist/all/.gitignore
docs/.gitignore
docs/ALFAsim_Technical_Manual___EN_US.pdf
docs/conf.py
docs/gui.rst
docs/images/advanced.png
docs/images/advanced_options.png
docs/images/advanced_options_model_explorer.png

In my local machine:

W:\alfasim\Projects\alfasim\alfasim_gui (fb-ASIM-3738-transient-input -> origin/current)
(_alfasim_gui-win64-py36) λ git status --ignored --untracked-files=all  --porcelain=2 | wc -l
41613

W:\alfasim\Projects\alfasim\alfasim_gui (fb-ASIM-3738-transient-input -> origin/current)
(_alfasim_gui-win64-py36) λ git ls-tree -r HEAD --name-only | wc -l
858

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions