mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
state: use json.dumps() instead of dump()
This actually 10 times faster, because everything is stored in the memory. Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+2
-1
@@ -93,8 +93,9 @@ class State(object):
|
||||
return
|
||||
|
||||
with SignalHandler():
|
||||
j = json.dumps(self._db)
|
||||
with open(self.state_file, 'w+') as fd:
|
||||
json.dump(self._db, fd)
|
||||
fd.write(j)
|
||||
|
||||
def dump(self):
|
||||
with self._lock:
|
||||
|
||||
Reference in New Issue
Block a user