-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
It seems the library decodes httpResponseBody from base64 multiple times:
- First, when detecting the response type:
scrapy-zyte-api/scrapy_zyte_api/responses.py
Line 197 in 1269ebb
body=b64decode(api_response["httpResponseBody"]), # type: ignore - And then when the response is created: or
scrapy-zyte-api/scrapy_zyte_api/responses.py
Line 127 in 1269ebb
body = b64decode(api_response["httpResponseBody"]) scrapy-zyte-api/scrapy_zyte_api/responses.py
Line 154 in 1269ebb
body=b64decode(api_response.get("httpResponseBody") or ""),
This looks like a potentially costly operation; it'd be great to optimize it, so that the decoding only happens once.
Metadata
Metadata
Assignees
Labels
No labels