Show More
@@ -1557,6 +1557,21 b' Controls generic server settings.' | |||
|
1557 | 1557 | repositories to the exchange format required by the bundle1 data |
|
1558 | 1558 | format can consume a lot of CPU. |
|
1559 | 1559 | |
|
1560 | ``zliblevel`` | |
|
1561 | Integer between ``-1`` and ``9`` that controls the zlib compression level | |
|
1562 | for wire protocol commands that send zlib compressed output (notably the | |
|
1563 | commands that send repository history data). | |
|
1564 | ||
|
1565 | The default (``-1``) uses the default zlib compression level, which is | |
|
1566 | likely equivalent to ``6``. ``0`` means no compression. ``9`` means | |
|
1567 | maximum compression. | |
|
1568 | ||
|
1569 | Setting this option allows server operators to make trade-offs between | |
|
1570 | bandwidth and CPU used. Lowering the compression lowers CPU utilization | |
|
1571 | but sends more bytes to clients. | |
|
1572 | ||
|
1573 | This option only impacts the HTTP server. | |
|
1574 | ||
|
1560 | 1575 | ``smtp`` |
|
1561 | 1576 | -------- |
|
1562 | 1577 |
@@ -74,7 +74,7 b' class webproto(wireproto.abstractserverp' | |||
|
74 | 74 | self.ui.ferr, self.ui.fout = self.oldio |
|
75 | 75 | return val |
|
76 | 76 | def groupchunks(self, cg): |
|
77 | z = zlib.compressobj() | |
|
77 | z = zlib.compressobj(self.ui.configint('server', 'zliblevel', -1)) | |
|
78 | 78 | while True: |
|
79 | 79 | chunk = cg.read(4096) |
|
80 | 80 | if not chunk: |
General Comments 0
You need to be logged in to leave comments.
Login now