Skip to content

Commit

Permalink
Use join in concat_list_of_bytes to improvement performance (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
1597463007 authored Oct 25, 2024
1 parent 6560d20 commit df9931e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scaler/about.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.8.11"
__version__ = "1.8.12"
5 changes: 1 addition & 4 deletions scaler/io/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit df9931e

Please sign in to comment.