From df9931eefbd5a82888c5b53c6f43bfcc33c811a9 Mon Sep 17 00:00:00 2001 From: 1597463007 Date: Fri, 25 Oct 2024 17:10:26 -0400 Subject: [PATCH] Use join in concat_list_of_bytes to improvement performance (#41) --- scaler/about.py | 2 +- scaler/io/utility.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/scaler/about.py b/scaler/about.py index d48d2bf..0a40090 100644 --- a/scaler/about.py +++ b/scaler/about.py @@ -1 +1 @@ -__version__ = "1.8.11" +__version__ = "1.8.12" diff --git a/scaler/io/utility.py b/scaler/io/utility.py index 861841f..9671051 100644 --- a/scaler/io/utility.py +++ b/scaler/io/utility.py @@ -28,7 +28,4 @@ def chunk_to_list_of_bytes(data: bytes) -> List[bytes]: def concat_list_of_bytes(data: List[bytes]) -> bytes: - one_object_bytes = bytearray() - for chunk in data: - one_object_bytes.extend(chunk) - return one_object_bytes + return bytearray().join(data)