Open d-nishchay opened 1 month ago
Via 22.12 version:
Via 24.7 version:
Same code, only version upgraded via poetry.
That’s probably too little to go on.
if you’ve got a local setup, perhaps you could run git bisect
to narrow it down?
Agree with dimaqq, this isn't enough information to go on.
As a side-note, if performance is a concern to you, there's a few things you can/should do:
Credentials
. Your app/script should only ever create a single Credentials
instance.limit
argument to TCPConnector
and added logging (see tracing) to get warned if we hit that limit. httpx presumably has similar tuning options.Ok thanks for your responses, here's a sample code:
from aiodynamo.client import Client
from aiodynamo.credentials import Credentials
from aiodynamo.expressions import HashKey
from aiodynamo.http.aiohttp import AIOHTTP
from aiohttp import ClientSession
async def get_all_wars() -> list:
"""
get_all_wars()
"""
async with ClientSession() as session:
client = Client(AIOHTTP(session), Credentials.auto(), "us-west-2")
table = client.table("db_table_wars")
all_wars = [record async for record in table.scan()]
return all_wars
Now this code if run using 22.12 aiodynamo, would fetch me results in like 2 seconds (for example), but same if run via 24.7 (which is upgraded through poetry.toml file update) would fetch me results in like 8 seconds.
@d-nishchay can you provide profile output for the two versions in your environment? Basically run your script using python -m cProfile -o output.prof scriptname.py
then upload the "output.prof" files for inspection.
We are using 22.12 since long and whenever we try to use 24.7 version, the same queries which takes 8 seconds to complete via older version are taking 40 seconds via new version.
We have tested this many times and still facing the same performance.
What are we missing ?