perf(s3): reduce bytes copy on r/w operations with S3 #188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test on reading 512MB object:
![image](https://private-user-images.githubusercontent.com/20128924/268861764-b110848b-da78-489c-8f9e-ce4d7169aab3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMTcwMjksIm5iZiI6MTcyNDAxNjcyOSwicGF0aCI6Ii8yMDEyODkyNC8yNjg4NjE3NjQtYjExMDg0OGItZGE3OC00ODljLThmOWUtY2U0ZDcxNjlhYWIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDIxMzIwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc3ZjZkMTQxNTE5YWQzOTAxZDU3NDU4N2E2YWU2OTY1OTFiZmI4OTBjY2MwZjJhMzc5ZDdlMGY0NDI1ZDZkOTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.52DZvy9n7h8DlsIbBFOTHofioYBLk460EEXSAC6FROQ)
![image](https://private-user-images.githubusercontent.com/20128924/268861833-7cbe57be-85a4-48db-ba8a-548ad89e4586.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMTcwMjksIm5iZiI6MTcyNDAxNjcyOSwicGF0aCI6Ii8yMDEyODkyNC8yNjg4NjE4MzMtN2NiZTU3YmUtODVhNC00OGRiLWJhOGEtNTQ4YWQ4OWU0NTg2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDIxMzIwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZiZTQ5YzdlMzNhODE0MDcxNDQ2ODQ3OGNiZjI2ZGY4NzA4NmI1ZTBjODBmODJjMjA3YTU5ZThjMWRjYzM3ZDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.o9WzIN1oX9zUDCo0c7ILKGxWwu78q7A1ySxSO2MFJtc)
before:
after: