Add LowPriorityExecutor to iOS#51047
Closed
rozele wants to merge 2 commits into
Closed
Conversation
Summary: In some apps, we spend a non-trivial amount of time calling ShadowNode destructors on the UI thread. A simple way to avoid stalling the UI thread is to move the `baseRevision_` instance to a data structure that is cleared on a background thread, so it's tree of ShadowNode shared_ptrs are released (and in most cases destroyed) on the background thread. To avoid thread initialization costs, this change adds an AsyncDestructor helper that uses a single background thread and a queue of to-be-destroyed objects that are released in a run loop. This change is also guarded by a feature flag so we can keep an eye out for potential memory leaks. ## Changelog [Internal] Differential Revision: D73688009
Summary: To be able to take advantage of the ReactNativeFeatureFlags::enableDestroyShadowTreeRevisionAsync feature, the iOS host platform implementation needs to supply a LowPriorityExecutor. This adds a LowPriorityExecutor implementation using a low priority dispatch queue. ## Changelog [Internal] Differential Revision: D73945440
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D73945440 |
Collaborator
|
This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label. |
Collaborator
|
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Collaborator
|
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Collaborator
|
Closing this PR as the diff D73945440 has been abandoned internally. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
To be able to take advantage of the ReactNativeFeatureFlags::enableDestroyShadowTreeRevisionAsync feature, the iOS host platform implementation needs to supply a LowPriorityExecutor.
This adds a LowPriorityExecutor implementation using a low priority dispatch queue.
Changelog
[Internal]
Differential Revision: D73945440