Optimize memory consumption
This commit is contained in:
@@ -117,6 +117,7 @@ class AIO(asyncio.Protocol):
|
|||||||
with open(tmpfile, "wb") as f:
|
with open(tmpfile, "wb") as f:
|
||||||
self.tmpfile = tmpfile
|
self.tmpfile = tmpfile
|
||||||
f.write(self.data)
|
f.write(self.data)
|
||||||
|
self.data = bytearray()
|
||||||
AIO.queue.put_nowait((AIO.config["uvscan_path"], tmpfile, self.process_uvscan_result))
|
AIO.queue.put_nowait((AIO.config["uvscan_path"], tmpfile, self.process_uvscan_result))
|
||||||
self.logger.info("{} queued uvscan of {}, queue size is {}".format(self.peer, tmpfile, AIO.queue.qsize()))
|
self.logger.info("{} queued uvscan of {}, queue size is {}".format(self.peer, tmpfile, AIO.queue.qsize()))
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user