Преглед изворни кода

Merge remote-tracking branch 'public/bug11787'

Nick Mathewson пре 9 година
родитељ
комит
fb762f6db0
2 измењених фајлова са 6 додато и 1 уклоњено
  1. 5 0
      changes/bug11787
  2. 1 1
      src/common/torgzip.c

+ 5 - 0
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.

+ 1 - 1
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);
   }