-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to skip JSON parsing for DynamoDB get_item, query, and the like #3238
Comments
The developer of
|
Likely relevant issue: boto/boto3#2928 |
Thanks for reaching out. I brought this issue up for discussion with the team, and the consensus was that there are no plans to change the current behavior. SDKs like Boto3 rely on the JSON parsing — you would need to call service APIs directly in order to get the raw responses. We can continue tracking the issue in boto/boto3#2928 for now to get more feedback and explore potential optimizations. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the feature
When doing
result = session.client("dynamodb").query(**kwargs)
, have an option to skip json-parsing of the output to speed up collection of results.Use Case
We are loading on the order of thousands of items from DynamoDB using aioboto3/aiobotocore. Each item is ~16KB, and we combine/filter items and forward them to a client. We noticed that in a loop retrieving these items, AioJSONParser.parse is the largest contributor of the time (as measured by pyinstrument).
botocore took 50 s for 1000 dynamodb queries (20% inside JSONParser.parse)
Proposed Solution
One possibility is to have a keyword argument for client and/or resource calls that turns off parsing that allows the user to receive the raw body of the response.
Other Information
botocore:
aiobotocore:
Cf: aio-libs/aiobotocore#1132
Acknowledgements
SDK version used
1.34.131 and higher
Environment details (OS name and version, etc.)
python 3.10, 3.11; Ubuntu 20.04
The text was updated successfully, but these errors were encountered: