Skip to content

Update startup perf api to accept undefined/null values#38323

Closed
ryancat wants to merge 1 commit into
facebook:mainfrom
ryancat:export-D43885535
Closed

Update startup perf api to accept undefined/null values#38323
ryancat wants to merge 1 commit into
facebook:mainfrom
ryancat:export-D43885535

Conversation

@ryancat
Copy link
Copy Markdown
Contributor

@ryancat ryancat commented Jul 13, 2023

Summary:
This change makes the returned values from performance.reactNativeStartupTiming to accept null or undefined. This is done as some platforms may not have certain startup timing information, and as a default value, it's discussed that null/undefined is better than zero.

  • Use unorderedMap instead of custom timing object for the C++ native module return value
  • Use std::nan as initialized value for unset doubles
  • Update examples to reflect the latest changes

Changelog:
[General][Internal] - Make the return values for reactNativeStartupTiming possible to be null or undefined

Reviewed By: mdvacca

Differential Revision: D43885535

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Jul 13, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43885535

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Jul 13, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,948,522 +375
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,542,050 +366
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 10feddc
Branch: main

ryancat pushed a commit to ryancat/react-native that referenced this pull request Jul 17, 2023
Summary:
Pull Request resolved: facebook#38323

This change makes the returned values from `performance.reactNativeStartupTiming` to accept null or undefined. This is done as some platforms may not have certain startup timing information, and as a default value, it's discussed that null/undefined is better than zero.

- Use `unorderedMap` instead of custom timing object for the C++ native module return value
- Use `std::nan` as initialized value for unset doubles
- Update examples to reflect the latest changes

Changelog:
[General][Internal] - Make the return values for `reactNativeStartupTiming` possible to be null or undefined

Reviewed By: mdvacca

Differential Revision: D43885535

fbshipit-source-id: 313d91e9f3dff94399c54ded16f9a364739021ca
@ryancat ryancat force-pushed the export-D43885535 branch from c4614fa to 1d4b7b1 Compare July 17, 2023 17:39
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43885535

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43885535

@ryancat ryancat force-pushed the export-D43885535 branch from 1d4b7b1 to 05d9a86 Compare July 20, 2023 23:49
@github-actions github-actions Bot added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jul 20, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43885535

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43885535

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43885535

Summary:
Pull Request resolved: facebook#38323

This change makes the returned values from `performance.reactNativeStartupTiming` to accept null or undefined. This is done as some platforms may not have certain startup timing information, and as a default value, it's discussed that null/undefined is better than zero.

- Use `unorderedMap` instead of custom timing object for the C++ native module return value
- Use `std::nan` as initialized value for unset doubles
- Update examples to reflect the latest changes

Changelog:
[General][Internal] - Make the return values for `reactNativeStartupTiming` possible to be null or undefined

Reviewed By: mdvacca

Differential Revision: D43885535

fbshipit-source-id: 791fb02d653f7da85ba134ae7def5b8764cc97d9
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D43885535

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 17, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 17f957a.

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. fb-exported Merged This PR has been merged. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants