3 ms·
How to Test S3 in Python (2020)
- orf 5y agoCreating a boto3 client is super expensive and benefits hugely from being re-used. I see lots of code, like the examples in the post, that re-create them over and over again.
- Hackbraten 5y agoThanks – good to know!
- closed 5y agoOn my laptop each run of boto3.client("s3") takes about 4 milliseconds. I'm guessing this is okay for most crud apps..! Edit: especially compared to any interactions with s3
- orf 5y ago4ms is an incredibly long time to construct an object. Under the hood it’s dynamically creating the client from JSON IDL files IIRC. At even 10 RPS it’s going to be taking a non-trivial amount of time, and I believe the connection pooling is done at the client level so you’re going to be paying for a new connection to s3 each time.
- Hackbraten 5y agoI’d like to have (2020) added to the title. How do I go about that? Can a moderator please do it?
- deleted 5y ago[deleted]
- rubayeet 5y agoAre there similar tools for GCP?