Skip to content

Conversation

@skshetry
Copy link
Collaborator

@skshetry skshetry commented Jul 25, 2022

--untracked-files and --unchanged coupled with --granular
puts a lot of stress on _show_status. Currently, with those options,
dvc spends ~26s on _show_status function.

Unhappy with the above result, I looked into improving the situation by using
console.out(highlight=False). It did reduce that to 9s but it still felt like a lot.

Then I dropped to good old colorama, which dropped to 3s(term)/1.24(redirected).
I tested with buffering output which dropped this further to ~600ms(term)/~100ms(redirected).

Note that this result was in VSCode which is slower than other terminals.
In gnome-terminal, I get about 175ms, and in kitty, it is around 125ms (undirected).

This may seem like premature optimization, but this was preventing me
from figuring out perf issues in granular outputs, and I believe the
users should not be penalized for using features that we already offer.

`--untracked-files` and `--unchanged` coupled with `--granular`
puts a lot of stress on `show_status`. Currently, with those options,
dvc spends ~26s on `_show_status` function.

Unhappy with the above result, I looked into improving the situation with
`console.out`. It did reduce that to 9s but it still felt like a lot.

Then I dropped to good old colorama, which dropped to 3s(term)/1.24(redirected).
I tested with buffering output which dropped this further to
~600ms(term)/~100ms(redirected).

This may seem like premature optimization, but this was preventing me
from figuring out perf issues in granular outputs, and I believe the
user should not be penalize for using feature that we already offer.
@skshetry skshetry requested review from dtrifiro and efiop July 25, 2022 11:35
@skshetry skshetry requested a review from a team as a code owner July 25, 2022 11:35
@skshetry skshetry merged commit 896aced into treeverse:main Jul 25, 2022
@skshetry skshetry deleted the fast-print-data-status branch July 25, 2022 12:02
@efiop efiop added the performance improvement over resource / time consuming tasks label Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance improvement over resource / time consuming tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants