Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple API calls should be done at the same time #3

Open
smiley opened this issue Dec 6, 2013 · 2 comments
Open

Multiple API calls should be done at the same time #3

smiley opened this issue Dec 6, 2013 · 2 comments

Comments

@smiley
Copy link
Owner

smiley commented Dec 6, 2013

APIs like SteamApp(...).achievements are becoming expensive with more and more functionality split into different API functions. ".achievements" requires 2 API calls if the game isn't user-associated (=1-2 seconds) or 3 API calls if the game is associated (=2-3 seconds).

While production servers might not experience much due to having a superb connection (each API call will probably amount to <60msec rather than the 310+ msec I'm experiencing), semi-asynchronous, "combined" calls should be looked into.

The easiest solution would be to just call these APIs synchronously, but all at the same time, then wait on all as a group. Another possible solution would be to use lazy-initialized proxy objects to these responses and just keep going, causing in a non-blocking flow until the data is absolutely necessary.

@smiley
Copy link
Owner Author

smiley commented Dec 6, 2013

This is proving to be quite an issue. While Requests natively supports asynchronous requests, it requires gevent, which just isn't easy to install and use on Windows, at least on Python x64.

@ghost ghost assigned smiley Dec 6, 2013
@djmattyg007
Copy link

Couldn't you just say "currently we don't support asynchronous requests on windows"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants