Skip to content

Commit ff9c83a

Browse files
committed
Disabled new implementation in favor of the old one - all that's needed is a c implementation of apply delta data
1 parent fa03f74 commit ff9c83a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

_delta_apply.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ void DCV_replace_one_by_many(const DeltaChunkVector* from, DeltaChunkVector* to,
450450

451451
// If we are somewhere in the middle, we have to make some space
452452
if (DCV_last(to) != at) {
453+
// IMPORTANT: This memmove kills the performance in case of large deltas
454+
// Causing everything to slow down enormously. Its logical, as the memory
455+
// gets shifted each time we insert nodes, for each chunk, for ever smaller
456+
// chunks depending on the deltas
453457
memmove((void*)(at+from->size), (void*)(at+1), (size_t)((DCV_end(to) - (at+1)) * sizeof(DeltaChunk)));
454458
}
455459

stream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def __init__(self, stream_list):
325325
self._dstreams = tuple(stream_list[:-1])
326326
self._br = 0
327327

328-
def _set_cache_(self, attr):
328+
def _set_cache_too_slow(self, attr):
329329
# the direct algorithm is fastest and most direct if there is only one
330330
# delta. Also, the extra overhead might not be worth it for items smaller
331331
# than X - definitely the case in python, every function call costs
@@ -360,7 +360,7 @@ def _set_cache_(self, attr):
360360

361361
self._mm_target.seek(0)
362362

363-
def _set_cache_brute_(self, attr):
363+
def _set_cache_(self, attr):
364364
"""If we are here, we apply the actual deltas"""
365365

366366
buffer_info_list = list()

0 commit comments

Comments
 (0)