@@ -40,7 +40,7 @@ application or use case:
40
40
- Your application is simple in execution, or you prefer to avoid using asynchronous calls
41
41
in your code
42
42
43
- - Your application relies on non-concurrent workloads or workloads with very fast
43
+ - Your application relies on serial workloads or workloads with very fast
44
44
response times
45
45
46
46
- You prefer the simplicity of synchronous logic when debugging your application
@@ -113,10 +113,15 @@ The following Motor method signatures behave differently in the {+driver-async+}
113
113
114
114
Motor users may experience a degradation of performance when switching to the
115
115
{+driver-async+} driver. This is due to the {+driver-async+} driver using the native
116
- ``asyncio`` library instead of thread-based executors.
117
-
118
- Users experiencing performance slowdown should consider using synchronous {+driver-short+}
119
- with ``async.loop.run_in_executor()`` for asynchronous compatibility. To learn more, see
116
+ ``asyncio`` library instead of thread-based executors. Thread-based executors
117
+ have similar performance characteristics to the synchronous driver, but slower.
118
+ This means they perform better for workloads that do not fit the preceding criteria
119
+ for the {+driver-async+} driver.
120
+
121
+ If you are experiencing performance slowdown, identify whether the {+driver-async+} driver
122
+ is necessary for your usecase. If you determine your use case is better served by
123
+ synchronous {+driver-short+}, consider using synchronous {+driver-short+}
124
+ with ``asyncio.loop.run_in_executor()`` for asynchronous compatibility. To learn more, see
120
125
the `Event Loop API documentation <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor>`__.
121
126
122
127
.. _pymongo-to-async-guide:
0 commit comments