Skip to content

Why the usual import "import aiohttp" causes a 10-15 MB increase in RAM #5889

Answered by Dreamsorcerer
masksshow asked this question in Q&A
Discussion options

You must be logged in to vote

I've no idea, but you could try using tracemalloc to investigate: https://docs.python.org/3/library/tracemalloc.html
If you find any obvious issues/improvements, then we can look at fixing them (I doubt any maintainer currently has time to do this investigation).

Also, have you tried only importing the client side? e.g. with from aiohttp import ClientSession, not sure if that might give an improvement or not...

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@webknjaz
Comment options

@Dreamsorcerer
Comment options

Answer selected by webknjaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants