-
Notifications
You must be signed in to change notification settings - Fork 8
use aiohttp and asyncio #27
Comments
Actually the current performance is pretty bad, for me its coming in about 5 seconds slower than the raw API. This package does seem useful, it's just right now, I cannot use it at that speed. I'm using Python 3.9. I've compared it actually in Jupyter and on a dedicated Docker system and both come back within a second using the native API in the docs. Are you using V2 of the API ??? |
I just checked you are indeed using V2. |
Its this line that is causing the performance issue... api = MailerLiteApi('xxxxx') Because I'm using it in a web page I have to run this for every request. In Jupyter its not so bad once I've created the api object, the actual API calls come back in a reasonable time. |
Hi @akblissweb,
Can you provide an example? if you have a server running, I do not understand why you need to call To be faster:
Also, any other suggestions/ideas/contributions are welcomed. Thank you for the feedback |
The current performance is ok but Faster is better.
For learning purposes and to improve the performance of huge mailing lists, it would be good to use
aiohttp
andasyncio
.EDIT:
e.g: https://towardsdatascience.com/fast-and-async-in-python-accelerate-your-requests-using-asyncio-62dafca83c33
The text was updated successfully, but these errors were encountered: