summaryrefslogtreecommitdiff
path: root/methods/mirror.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-12-26 14:49:00 +0100
committerJulian Andres Klode <jak@debian.org>2015-12-26 14:49:00 +0100
commit0b29c72bdfc1466d47567cc3191b9661f81d3d3f (patch)
tree7654f9698d632a6b00ff62ab7046d7fa7bab9dfc /methods/mirror.h
parent65ac6aad5f707849a127202f808d087d1fcaddc9 (diff)
Use a hardcoded buffer size of 4096 to fix performance
The code uses memmove() to move parts of the buffer to the front when the buffer is only partially read. By simply reading one page at a time, the maximum size of bytes that must be moved has a hard limit, and performance improves: In one test case, consisting of a 430 MB Contents file, and a 75K PDiff, applying the PDiff previously took about 48 seconds and now completes in 2 seconds. Further speed up can be achieved by buffering writes, they account for about 60% of the run-time now.
Diffstat (limited to 'methods/mirror.h')
0 files changed, 0 insertions, 0 deletions