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

[Threading] Increase the stack size for the React queue on older Android phones #7416

Closed
wants to merge 1 commit into from

Conversation

ide
Copy link
Contributor

@ide ide commented May 5, 2016

Older Android devices don't have a large stack by default and with about 16 levels of views the app will crash. Modern Android devices are fine so we can continue to use the system defaults while using a 2MB stack on older Android devices.

Test Plan: App that was crashing on older Android devices no longer crashes.

Fixes #5404

@ghost
Copy link

ghost commented May 5, 2016

By analyzing the blame information on this pull request, we identified @mhorowitz and @astreet to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels May 5, 2016
@@ -44,10 +48,12 @@ public static Builder builder() {
}

public static ReactQueueConfigurationSpec createDefault() {
MessageQueueThreadSpec spec = Build.VERSION.SDK_INT < 20 ?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you verify this is the correct SDK int?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were seeing the issue on KitKat (specifically API 19, don't have API 20) but not Marshmallow (API 21+). Changed this check to < 21 so that we cover all of KitKat.

@astreet
Copy link
Contributor

astreet commented May 6, 2016

This seems reasonable, thanks for gating to lower android versions

@ide ide force-pushed the stack-size branch 2 times, most recently from 03a7c95 to bc2dd2a Compare May 8, 2016 03:20
…oid phones

Older Android devices don't have a large stack by default and with about 16 levels of views the app will crash. Modern Android devices are fine so we can continue to use the system defaults while using a 2MB stack on older Android devices.

Test Plan: App that was crashing on older Android devices no longer crashes.
@ghost
Copy link

ghost commented May 8, 2016

@ide updated the pull request.

@astreet
Copy link
Contributor

astreet commented May 9, 2016

@facebook-github-bot shipit

@ghost ghost added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels May 9, 2016
@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in d4f6f61 May 9, 2016
@ide ide deleted the stack-size branch May 9, 2016 19:04
zebulgar pushed a commit to nightingale/react-native that referenced this pull request Jun 18, 2016
Summary:
Older Android devices don't have a large stack by default and with about 16 levels of views the app will crash. Modern Android devices are fine so we can continue to use the system defaults while using a 2MB stack on older Android devices.
Closes facebook#7416

Differential Revision: D3276805

Pulled By: astreet

fbshipit-source-id: a7b31a1be62e13f333148ca0908eb01a11aa4562
samerce pushed a commit to iodine/react-native that referenced this pull request Aug 23, 2016
Summary:
Older Android devices don't have a large stack by default and with about 16 levels of views the app will crash. Modern Android devices are fine so we can continue to use the system defaults while using a 2MB stack on older Android devices.
Closes facebook#7416

Differential Revision: D3276805

Pulled By: astreet

fbshipit-source-id: a7b31a1be62e13f333148ca0908eb01a11aa4562
mpretty-cyro pushed a commit to HomePass/react-native that referenced this pull request Aug 25, 2016
Summary:
Older Android devices don't have a large stack by default and with about 16 levels of views the app will crash. Modern Android devices are fine so we can continue to use the system defaults while using a 2MB stack on older Android devices.
Closes facebook#7416

Differential Revision: D3276805

Pulled By: astreet

fbshipit-source-id: a7b31a1be62e13f333148ca0908eb01a11aa4562
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants