From 8ecfcf712c4e673687e4904e0a73e5c70b1a7eeb Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 7 May 2014 10:27:30 -0400 Subject: [PATCH 1/2] Synchronize less frequently when compressing descriptors This may improve our compression ratios. fix for 11787 --- src/common/torgzip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/torgzip.c b/src/common/torgzip.c index 15451ee30d..239cab9cac 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -472,7 +472,7 @@ tor_zlib_process(tor_zlib_state_t *state, state->stream.avail_out = (unsigned int)*out_len; if (state->compress) { - err = deflate(&state->stream, finish ? Z_FINISH : Z_SYNC_FLUSH); + err = deflate(&state->stream, finish ? Z_FINISH : Z_NO_FLUSH); } else { err = inflate(&state->stream, finish ? Z_FINISH : Z_SYNC_FLUSH); } From c3f04f3daa27ce61da10e9bcf12cf05b376f73ed Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 20 Aug 2014 13:33:49 -0400 Subject: [PATCH 2/2] Changes file for bug 11787 --- changes/bug11787 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changes/bug11787 diff --git a/changes/bug11787 b/changes/bug11787 new file mode 100644 index 0000000000..014662d921 --- /dev/null +++ b/changes/bug11787 @@ -0,0 +1,5 @@ + o Minor bugfixes (directory bandwidth performance): + - Don't flush the zlib buffer aggressively when compressing + directory information for clients. This should save about 7% of + the bandwidth currently used for compressed descriptors and + microdescriptors. Fixes bug 11787; bugfix on 0.1.1.23.