[PATCH] Parallelize pulling by ssh
This causes ssh-pull to request objects in prefetch() and read then in fetch(), such that it reduces the unpipelined round-trip time. This also makes sha1_write_from_fd() support having a buffer of data which it accidentally read from the fd after the object; this was formerly not a problem, because it would always get a short read at the end of an object, because the next object had not been requested. This is no longer true. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
1e8be59d14
commit
70b9829ea7
3
cache.h
3
cache.h
@ -198,7 +198,8 @@ extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned l
|
||||
/* Read a tree into the cache */
|
||||
extern int read_tree(void *buffer, unsigned long size, int stage, const char **paths);
|
||||
|
||||
extern int write_sha1_from_fd(const unsigned char *sha1, int fd);
|
||||
extern int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
|
||||
size_t bufsize, size_t *bufposn);
|
||||
extern int write_sha1_to_fd(int fd, const unsigned char *sha1);
|
||||
|
||||
extern int has_sha1_pack(const unsigned char *sha1);
|
||||
|
||||
Reference in New Issue
Block a user