Forráskód Böngészése

perf: increase buffer sizes from 4-8KB to 64KB

- Increase _ZLIB_BUFSIZE from 4KB to 64KB for better pack file I/O
- Increase _RBUFSIZE from 8KB to 64KB for better network I/O
Jelmer Vernooij 1 hónapja
szülő
commit
31e34a2094
2 módosított fájl, 2 hozzáadás és 2 törlés
  1. 1 1
      dulwich/pack.py
  2. 1 1
      dulwich/protocol.py

+ 1 - 1
dulwich/pack.py

@@ -282,7 +282,7 @@ class UnpackedObject:
         return "{}({})".format(self.__class__.__name__, ", ".join(data))
 
 
-_ZLIB_BUFSIZE = 4096
+_ZLIB_BUFSIZE = 65536  # 64KB buffer for better I/O performance
 
 
 def read_zlib_chunks(

+ 1 - 1
dulwich/protocol.py

@@ -382,7 +382,7 @@ class Protocol:
         return parse_cmd_pkt(line)
 
 
-_RBUFSIZE = 8192  # Default read buffer size.
+_RBUFSIZE = 65536  # 64KB buffer for better network I/O performance
 
 
 class ReceivableProtocol(Protocol):