]> git.ipfire.org Git - pbs.git/commitdiff
packages: Read files with a larger chunk size
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 24 Jan 2025 10:37:22 +0000 (10:37 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 24 Jan 2025 10:37:22 +0000 (10:37 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/packages.py

index 9868ab8c904a2959a152c4c7e7e5d35607751e43..8add22a9b9502ceedeb672237d5aea4b8317e9bc 100644 (file)
@@ -730,7 +730,7 @@ class File(database.Base):
                # Read the payload in a separate thread
                return await asyncio.to_thread(func)
 
-       async def sendfile(self, dst, chunk_size=8192):
+       async def sendfile(self, dst, chunk_size=65536):
                """
                        Sends the payload of the file into the given file descriptor
                """
@@ -738,7 +738,7 @@ class File(database.Base):
 
                return await asyncio.to_thread(self._sendfile, src, dst, chunk_size=chunk_size)
 
-       def _sendfile(self, src, dst, chunk_size=8192):
+       def _sendfile(self, src, dst, chunk_size=65536):
                while True:
                        chunk = src.read(chunk_size)
                        if not chunk: