shanipribadi commented on code in PR #6086:
URL: https://github.com/apache/opendal/pull/6086#discussion_r2096082310
##########
bindings/python/python/opendal/__init__.pyi:
##########
@@ -472,6 +475,20 @@ class AsyncFile:
Args:
bs (bytes): The content to write.
"""
+ async def write_from(self, other: AsyncFile) -> None:
Review Comment:
the rust based write_from seems to have an improvement of 18~28% copy
throughput compared to the naive python loop based on the benchmark shared
here: https://github.com/apache/opendal/issues/5943#issuecomment-2858120315
is the suggestion here to provide a function with similar function signature
as shutil.copyfileobj but copying is still done on the rust side?
but on the rust side, the chunk size itself is already an option for both
the reader and writer,
not sure if there is a need to ask for bufsize again.. (I assume the bufsize
would be most optimal if set based on the chunk size options set on the reader
and writer)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]