-
Notifications
You must be signed in to change notification settings - Fork 20
DOCSP-48153: Add sync vs. async content to migration page #241
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
197ba16
DOCSP-48153: Add sync vs. async content to migration page
mcmorisi c01f832
Fix
mcmorisi a3802ae
Fix
mcmorisi 9f78ffa
SA feedback + additional admonition
mcmorisi 10a57c2
SA feedback
mcmorisi 9fd6469
NS feedback
mcmorisi a027a87
Fix
mcmorisi b5474f9
Fix
mcmorisi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -40,7 +40,7 @@ application or use case: | |||||
- Your application is simple in execution, or you prefer to avoid using asynchronous calls | ||||||
in your code | ||||||
|
||||||
- Your application relies on non-concurrent workloads or workloads with very fast | ||||||
- Your application relies on serial workloads or workloads with very fast | ||||||
response times | ||||||
|
||||||
- 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+} | |||||
|
||||||
Motor users may experience a degradation of performance when switching to the | ||||||
{+driver-async+} driver. This is due to the {+driver-async+} driver using the native | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
``asyncio`` library instead of thread-based executors. | ||||||
|
||||||
Users experiencing performance slowdown should consider using synchronous {+driver-short+} | ||||||
with ``async.loop.run_in_executor()`` for asynchronous compatibility. To learn more, see | ||||||
``asyncio`` library instead of thread-based executors. Thread-based executors | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
have similar performance characteristics to the synchronous driver, but slower. | ||||||
This means they perform better for workloads that do not fit the preceding criteria | ||||||
for the {+driver-async+} driver. | ||||||
|
||||||
If you are experiencing performance slowdown, identify whether the {+driver-async+} driver | ||||||
is necessary for your usecase. If you determine your use case is better served by | ||||||
synchronous {+driver-short+}, consider using the synchronous driver | ||||||
with ``asyncio.loop.run_in_executor()`` for asynchronous compatibility. To learn more, see | ||||||
the `Event Loop API documentation <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor>`__. | ||||||
|
||||||
.. _pymongo-to-async-guide: | ||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.