You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MailChimpClient open a new connection for every request. It's faster to reuse the connection pool and keep-alive. So, the MailChimpClient should open and keep the requests session.
Also, if the MailChimpClient would implement the session, then it should have some close() and/or __exit__() methods to close the session manually.
The text was updated successfully, but these errors were encountered:
xmedeko
changed the title
MailChimpClient resuse connection pool and keep-alive
MailChimpClient reuse connection pool and keep-alive
Sep 20, 2017
I have tried to patch MailChimp class to use just one session and it has lead to about 1/3 speedup on my development machine. I can make a PR to use a session in the MailChimpClient. However, I think the MailChimp should not be child of MailChimpClient. It should use MailChimpClient as a fields only (inheritance vs. composition). Then it would be possible to switch different implementations of MailChimpClient.
Nevertheless, most of the use cases may be solved by batch processing.
MailChimpClient
open a new connection for every request. It's faster to reuse the connection pool and keep-alive. So, theMailChimpClient
should open and keep the requests session.Also, if the
MailChimpClient
would implement the session, then it should have someclose()
and/or__exit__()
methods to close the session manually.The text was updated successfully, but these errors were encountered: