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

iOS: Measure startup memory footprint #28215

Closed
wants to merge 2 commits into from

Conversation

tido64
Copy link
Collaborator

@tido64 tido64 commented Mar 2, 2020

Summary

As part of React Native Benchmark Suite, we are looking to surface the impact of a change on the memory footprint.

I hit an issue with the JavaScriptCore instance seemingly not being cleaned up properly, and somehow gets reused (see example output below). I haven't been able figure out what the deal is, but I think it might be valuable to check this in as is.

Changelog

[Internal] [Added] - Added initial memory footprint test (this will always pass for now)

Test Plan

This currently only outputs to the console:

Checkpoint Initial usage Avg. usage Std. deviation
Start loading JS +118 784 +11 878 ±35 635 (±300%)
Start executing JS +1 372 160 +902 348 ±156 937 (±17%)
Done loading JS +110 592 +42 188 ±22 883 (±54%)

@facebook-github-bot facebook-github-bot added p: Microsoft Partner: Microsoft Partner CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Mar 2, 2020
@tido64
Copy link
Collaborator Author

tido64 commented Mar 2, 2020

@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Mar 2, 2020
@analysis-bot
Copy link

RNTester.app (iOS): 10678272 bytes

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@hramos
Copy link
Contributor

hramos commented Mar 20, 2020

This is currently blocked internally because of these failing unit tests:

Failing tests:
	RNTesterUnitTests:
		-[RCTModuleInitTests testCustomInitModuleInitializedAtBridgeStartup]
		-[RCTModuleInitTests testCustomInitModuleInitializedAtBridgeStartup]
		-[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup]
		-[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup]
		-[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup]
		-[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup]
		-[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup]
** TEST FAILED **

Sample error console output:

RNTester/RNTesterUnitTests/RCTModuleInitTests.m:236: error: -[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup] : failed - Runloop timed out before condition was met
RNTester/RNTesterUnitTests/RCTModuleInitTests.m:237: error: -[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup] : ((_exportConstantsModuleNotificationSent) is true) failed
RNTester/RNTesterUnitTests/RCTModuleInitTests.m:239: error: -[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup] : failed - Runloop timed out before condition was met
RNTester/RNTesterUnitTests/RCTModuleInitTests.m:240: error: -[RCTModuleInitTests testExportConstantsModuleInitializedAtBridgeStartup] : ((module.exportedConstants) is true) failed

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 11, 2023
@tido64 tido64 closed this Apr 11, 2023
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. p: Microsoft Partner: Microsoft Partner Stale There has been a lack of activity on this issue and it may be closed soon. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants