This change does two things to improve performance:
Only calls server_info() once instead of for each document.
Sets the tailable await data cursor option so that the server will wait for a few seconds after returning the full result set so that it can capture and return additional data added during the query. Without this option, the client overloads the server with requests for more documents from the cursor.
This change does two things to improve performance:
server_info()
once instead of for each document.Related to https://jira.mongodb.org/browse/PYTHON-1276. Fixes #20