Liron Aravot has posted comments on this change. Change subject: core: GET requests - use Range header ......................................................................
Patch Set 8: (1 comment) http://gerrit.ovirt.org/#/c/28465/8/vdsm/BindingXMLRPC.py File vdsm/BindingXMLRPC.py: Line 284: raise self.RequestException( Line 285: httplib.BAD_REQUEST, Line 286: "unspecified range last byte position isn't supported") Line 287: Line 288: return self._getInt(last_byte) + 1 > Compiling the regex may be 10x times faster but it will only save few micro The regex will be cached at the first time it's compiled, so the benefit of compiling it manually is actual non-existing in terms of performance. from the python documentation: 'Under the hood, these functions simply create a pattern object for you and call the appropriate method on it. They also store the compiled object in a cache, so future calls using the same RE are faster. Should you use these module-level functions, or should you get the pattern and call its methods yourself? That choice depends on how frequently the RE will be used, and on your personal coding style. If the RE is being used at only one point in the code, then the module functions are probably more convenient.' so i don't see to add a code for improved performance while it's unneeded according to the language spec. in other terms, it's arguable which convention is better. i prefer that one. Line 289: Line 290: def send_error(self, error, message, exc_info=False): Line 291: try: Line 292: self.log.error(message, exc_info=exc_info) -- To view, visit http://gerrit.ovirt.org/28465 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8164867347b1cf800efd2a78cc98dbc10c02ee0d Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Liron Aravot <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Nir Soffer <[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
