Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

plumbing: packfile, Add a buffer to crc writer #724

Merged
merged 2 commits into from
Jan 21, 2018

Conversation

jfontan
Copy link
Contributor

@jfontan jfontan commented Jan 19, 2018

crc update with block smaller than 16 bytes uses a slower version of the
function. ReadByte is heavily used by zlib inflate so most of the time
crc is updated byte by byte.

A new Flush method is added to the scanner to flush this crc writer
cache. It is only called when the Scanner reader is a teeReader.

Times to push localy from different repositories:

repo unbuffered buffered
cangallo 139.21ms 152.13ms
octoprint-tft 2.84s 2.92s
numpy 47.29s 44.94s
tensorflow 2m17.94s 1m56.92s
bismuth 8m13.79s 7m01.46s

I will try to make more tests with small repos if needed. The numbers in these repos changed a lot when using the laptop to test.

@jfontan jfontan requested review from ajnavarro and mcuadros January 19, 2018 17:33
@mcuadros
Copy link
Contributor

@jfontan please read CONTRIBUTING.md

@jfontan jfontan force-pushed the improvement/buffered-tee-reader branch from 429f9eb to 2da5738 Compare January 21, 2018 20:36
@jfontan jfontan changed the title Add a buffer to crc writer plumbing: packfile, Add a buffer to crc writer Jan 21, 2018
@jfontan
Copy link
Contributor Author

jfontan commented Jan 21, 2018

I've updated commit message to conform to contributing guidelines. An extra commit was added with explicit checking of CRC calculated by the scanner.

crc update with block smaller than 16 bytes uses a slower version of the
function. ReadByte is heavily used by zlib inflate so most of the time
crc is update byte by byte.

A new Flush method is added to the scanner to flush this crc writer
cache. It is only called when the Scanner reader is a teeReader.

Signed-off-by: Javi Fontan <[email protected]>
@jfontan jfontan force-pushed the improvement/buffered-tee-reader branch from 2da5738 to 1cb896b Compare January 21, 2018 20:51
@mcuadros mcuadros merged commit 834cd6f into src-d:master Jan 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants