mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
data status: optimize printing status list
`--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.
This commit is contained in:
committed by
skshetry
parent
fd7dcae8aa
commit
896acedb07
@@ -7,6 +7,7 @@ from dvc.cli import main, parse_args
|
||||
from dvc.commands.data import CmdDataStatus
|
||||
from dvc.repo import Repo
|
||||
from dvc.repo.data import Status
|
||||
from tests.func.parsing.test_errors import escape_ansi
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -135,5 +136,5 @@ DVC unchanged files:
|
||||
expected_out += """\
|
||||
(there are other changes not tracked by dvc, use "git status" to see)
|
||||
"""
|
||||
assert out == expected_out
|
||||
assert escape_ansi(out) == expected_out
|
||||
assert not err
|
||||
|
||||
Reference in New Issue
Block a user