dvc: optimize imports to speedup startup time

Speeds up `time dvc` from 1.2 seconds to <0.2 seconds.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-07-18 11:20:05 +03:00
parent f54428d5ed
commit 3410f8048a
10 changed files with 64 additions and 26 deletions
+3 -2
View File
@@ -1,12 +1,13 @@
import os
from dvc.command.common.base import CmdBase
from dvc.project import ReproductionError
from dvc.stage import Stage
class CmdRepro(CmdBase):
def run(self):
from dvc.project import ReproductionError
from dvc.stage import Stage
recursive = not self.args.single_item
saved_dir = os.path.realpath(os.curdir)
if self.args.cwd: