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

feat(settings): add profiler #1538

Merged
merged 1 commit into from
Feb 5, 2024
Merged

feat(settings): add profiler #1538

merged 1 commit into from
Feb 5, 2024

Conversation

pwltr
Copy link
Collaborator

@pwltr pwltr commented Feb 5, 2024

Description

Adds react-native-release-profiler to dev settings. Trace file will be saved to downloads folder and can be loaded into https://www.speedscope.app/ to explore.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

Tests

  • Detox test
  • Unit test
  • No test

Screenshot / Video

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-02-05.at.14.14.31.mp4

For example when adding the price widget calls to crypto_sign_verify_detached() are taking anywhere from 100ms to 1000ms with sodium-react-native module replacement disabled, afterwards down to 2-20ms.

before:
profile-9A7AB7F4-7AD7-4FB7-B5AD-9841D2CC791C-75503-00000DFFFC6FE561-converted.json

after:
profile-02DB5297-3A2F-483B-881F-2915BF047A72-88677-00000E1065B2BCB6-converted.json

For the simulator these commands will pull the file to host:
iOS: npx react-native-release-profiler --local <path to profile>
Android: npx react-native-release-profiler --fromDownload --appId <your appId>

@pwltr pwltr requested a review from limpbrains February 5, 2024 15:53
Copy link
Collaborator

@limpbrains limpbrains left a comment

Choose a reason for hiding this comment

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

This is cool

@pwltr pwltr merged commit 87d589f into master Feb 5, 2024
4 checks passed
@pwltr pwltr deleted the feat/release-profiler branch February 5, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants