dvc: introduce multithreaded import and RFC, v2

This allows us to download files in a few threads.
Also includes RFC, as we can now get rid of import-bulk.py.

v2: use POOL_SIZE=4

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2017-06-07 14:16:15 +03:00
parent 89311c1af5
commit 4f938cec71
4 changed files with 136 additions and 117 deletions
+3 -2
View File
@@ -14,6 +14,9 @@ from dvc.runtime import Runtime
from dvc.system import System
from dvc.data_cloud import DataCloud
#FIXME add cmdline argument and config option for POOL_SIZE
POOL_SIZE = 4
class DataSyncError(DvcException):
def __init__(self, msg):
super(DataSyncError, self).__init__('Data sync error: {}'.format(msg))
@@ -31,8 +34,6 @@ class CmdDataSync(CmdBase):
def run(self):
with DvcLock(self.is_locker, self.git):
cloud = DataCloud(self.settings)
#FIXME add cmdline argument and config option for POOL_SIZE
POOL_SIZE = 10
pool = ThreadPool(processes=POOL_SIZE)
targets = []