mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
rpc: optimize JSON-RPC response handling
Speed up JSON-RPC response handling by putting received response data fragments in a list and joining them at once instead of concatenating each fragment one by one. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
56c66f44a0
commit
11de39651f
@ -404,13 +404,13 @@ def xml_loads(data, encoding='UTF-8'):
|
||||
|
||||
class DummyParser(object):
|
||||
def __init__(self):
|
||||
self.data = b''
|
||||
self.data = []
|
||||
|
||||
def feed(self, data):
|
||||
self.data += data
|
||||
self.data.append(data)
|
||||
|
||||
def close(self):
|
||||
return self.data
|
||||
return b''.join(self.data)
|
||||
|
||||
|
||||
class MultiProtocolTransport(Transport):
|
||||
|
Loading…
Reference in New Issue
Block a user