Nir Soffer has posted comments on this change.

Change subject: Allow GZIP transport on XMLRPC
......................................................................


Patch Set 2:

(2 comments)

Vinzenz, please check also my comments for patch 1:

- http://gerrit.ovirt.org/#/c/25201/1/lib/vdsm/utils.py
- http://gerrit.ovirt.org/#/c/25201/1/lib/vdsm/vdscli.py.in

http://gerrit.ovirt.org/#/c/25201/2/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 195:     # the methods only on Python 2.6.
Line 196: 
Line 197:     if sys.version_info[:2] == (2, 6):
Line 198:         def __init__(self, *args, **kwargs):
Line 199:             self.encode_threshold = 1400
> what is this magic number? Can we have a descriptive _CONSTANT instead? Doe
This module already have code stolen from Python, so Vinzenz did not change 
anything.  How about moving such code to lib/vdsm/python.py with python license?

Then we can call this code here.
Line 200:             SimpleXMLRPCRequestHandler.__init__(self, *args, **kwargs)
Line 201: 
Line 202:         # a re to match a gzip Accept-Encoding
Line 203:         aepattern = re.compile(r"""


Line 226:                 # Get arguments by reading body of request.
Line 227:                 # We read this in chunks to avoid straining
Line 228:                 # socket.read(); around the 10 or 15Mb mark, some 
platforms
Line 229:                 # begin to have problems (bug #792570).
Line 230:                 max_chunk_size = 10 * 1024 * 1024
> I love spaces, but they belong to another patch.
The real fix here is not adding spaces but using sane value such as 128 * 1024. 
There is no reason to read from a socket in chunks of 10MB. In another patch  
of course.
Line 231:                 size_remaining = int(self.headers["content-length"])
Line 232:                 L = []
Line 233:                 while size_remaining:
Line 234:                     chunk_size = min(size_remaining, max_chunk_size)


-- 
To view, visit http://gerrit.ovirt.org/25201
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iebdaa04b17e2c1df1c1852ed536c5d6d8ec8d88b
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to