Skip to content

Conversation

@dtrifiro
Copy link
Contributor

While playing with dvc exp, I noticed that it would take a huge amount of time before getting any output.

I tracked this down to dvc/repo/experiments/__init__.py#L401: a self.scm.status() was taking a long time because of a large untracked directory (.venv virtualenv folder).

This is a kinda naive patch that prints a warning whenever it takes more than 10s for status to return. I don't intend for this to be merged, rather to be a starting point for a discussion.

@dtrifiro
Copy link
Contributor Author

dtrifiro commented Mar 16, 2022

Also see treeverse/dvc#7471

@pmrowla
Copy link
Contributor

pmrowla commented Mar 17, 2022

We probably should just submit an upstream patch to optimize dulwich porcelain.status with an option to skip walking untracked directories on status (similar to the existing option to skip walking ignored directories)

https://github.com/jelmer/dulwich/blob/0aa42073297748b07f5d176557b2357e87ddffbe/dulwich/porcelain.py#L1218

(basically the current default in dulwich behaves more like git status -u)

@dtrifiro
Copy link
Contributor Author

Good point, I'll have a look

@dtrifiro dtrifiro marked this pull request as draft April 7, 2022 08:05
@dtrifiro
Copy link
Contributor Author

dtrifiro commented May 2, 2022

Opened jelmer/dulwich#956, will open a new one here when/if that is merged

@efiop efiop changed the title Git.status: add warning on slow status call status: add warning on slow status call May 3, 2022
@dtrifiro
Copy link
Contributor Author

Getting rid of this, ended up implenting Peter's suggestion in #69

@dtrifiro dtrifiro closed this May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants