Alexander Mohr

Results 302 comments of Alexander Mohr

mind trying latest version of aiohttp? They fixed a blocking issue. Also mind running profiler like [pyvmmonitor](https://www.pyvmmonitor.com/index.html). It should provide insights where the slowness is. otherwise I can run it...

seems like it's not re-using the connection, note 31 calls to `_UnixSelectorEventLoop.create_connection` . I want to look into this when i get some time. If you're free is there any...

ok so I think the problem is that when doing a `head_object` w/o the region of the bucket botocore first tries to do the op region-less, ex: `https://bucket-name.s3.amazonaws.com/key_name` which causes...

you won't know the region of the bucket ahead of time? you can do the lookup yourself to solve this

can you try using SigV4? That requires the region to be used so botocore may do the right thing: see https://github.com/boto/botocore/issues/2109#issuecomment-663267168

remember clients are context objects because they hold onto connection pools, so patching it this low level is not recommended. I just logged this: https://github.com/boto/botocore/issues/2393 Here's what I get if...

I recommend something like this: ```python from contextlib import AsyncExitStack from typing import Dict, Any class S3ClientRegionCache: def __init__(self, session: aiobotocore.AioSession): self._session = session self._exit_stack = AsyncExitStack() self._client = None...

perhaps making the aio portion available for python3.x only? I think they do a similar thing with pyzmq: http://pyzmq.readthedocs.org/en/latest/api/zmq.asyncio.html