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

chore(deps): Upgrade performance test apps to RN 0.77 #4515

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Feb 7, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

This PR bumps the performance test apps to RN 0.77.

Note that I recreated the apps for 0.77 due to the extended upgrade diff and the fact that the apps did not have any major customisations.

Diff: RnDiffApp 0.70.15 vs TestAppPlain

Only in rn-diff-purge-release-0.70.15/RnDiffApp: .buckconfig
Only in rn-diff-purge-release-0.70.15/RnDiffApp: .bundle
Only in rn-diff-purge-release-0.70.15/RnDiffApp: .eslintrc.js
Only in rn-diff-purge-release-0.70.15/RnDiffApp: .flowconfig
diff rn-diff-purge-release-0.70.15/RnDiffApp/.gitignore /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/.gitignore
33d32
< .cxx/
64a64,66
> 
> #Codegen
> .cxx/
Only in rn-diff-purge-release-0.70.15/RnDiffApp: .node-version
Only in rn-diff-purge-release-0.70.15/RnDiffApp: .prettierrc.js
Only in rn-diff-purge-release-0.70.15/RnDiffApp: .watchmanconfig
diff rn-diff-purge-release-0.70.15/RnDiffApp/App.js /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/App.js
29,30d28
< /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
<  * LTI update could not be added via codemod */
66,69c64
<       <StatusBar
<         barStyle={isDarkMode ? 'light-content' : 'dark-content'}
<         backgroundColor={backgroundStyle.backgroundColor}
<       />
---
>       <StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
diff rn-diff-purge-release-0.70.15/RnDiffApp/Gemfile /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/Gemfile
4c4
< ruby '>= 2.6.10'
---
> ruby '2.7.5'
6,7c6
< gem 'cocoapods', '>= 1.11.3'
< gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
---
> gem 'cocoapods', '~> 1.11', '>= 1.11.2'
Only in rn-diff-purge-release-0.70.15/RnDiffApp: __tests__
Only in /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain: _bundle
Common subdirectories: rn-diff-purge-release-0.70.15/RnDiffApp/android and /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/android
diff rn-diff-purge-release-0.70.15/RnDiffApp/app.json /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/app.json
2,3c2,3
<   "name": "RnDiffApp",
<   "displayName": "RnDiffApp"
---
>   "name": "TestAppPlain",
>   "displayName": "TestAppPlain"
Common subdirectories: rn-diff-purge-release-0.70.15/RnDiffApp/ios and /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/ios
Only in /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain: node_modules
diff rn-diff-purge-release-0.70.15/RnDiffApp/package.json /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/package.json
2,3c2,3
<   "name": "RnDiffApp",
<   "version": "0.0.1",
---
>   "name": "TestAppPlain",
>   "version": "6.6.0",
8,10c8
<     "start": "react-native start",
<     "test": "jest",
<     "lint": "eslint ."
---
>     "start": "react-native start"
19,24c17
<     "@react-native-community/eslint-config": "^2.0.0",
<     "babel-jest": "^26.6.3",
<     "eslint": "^7.32.0",
<     "jest": "^26.6.3",
<     "metro-react-native-babel-preset": "0.72.4",
<     "react-test-renderer": "18.1.0"
---
>     "metro-react-native-babel-preset": "^0.72.3"

Diff: TestAppPlain vs TestAppSentry

diff /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/App.js /Users/antonis/git/sentry-react-native/performance-tests/TestAppSentry/App.js
28a29,34
> import * as Sentry from '@sentry/react-native';
> 
> Sentry.init({
>   dsn: 'https://[email protected]/5428561',
> });
> 
Common subdirectories: /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/_bundle and /Users/antonis/git/sentry-react-native/performance-tests/TestAppSentry/_bundle
Common subdirectories: /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/android and /Users/antonis/git/sentry-react-native/performance-tests/TestAppSentry/android
diff /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/app.json /Users/antonis/git/sentry-react-native/performance-tests/TestAppSentry/app.json
2,3c2,3
<   "name": "TestAppPlain",
<   "displayName": "TestAppPlain"
---
>   "name": "TestAppSentry",
>   "displayName": "TestAppSentry"
Common subdirectories: /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/ios and /Users/antonis/git/sentry-react-native/performance-tests/TestAppSentry/ios
diff /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/metro.config.js /Users/antonis/git/sentry-react-native/performance-tests/TestAppSentry/metro.config.js
0a1,2
> const { withMonorepo } = require('sentry-react-native-samples-utils/metro');
> 
7,8c9
< 
< module.exports = {
---
> module.exports = withMonorepo({
17c18,19
< };
---
>   projectRoot: __dirname,
> });
Common subdirectories: /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/node_modules and /Users/antonis/git/sentry-react-native/performance-tests/TestAppSentry/node_modules
diff /Users/antonis/git/sentry-react-native/performance-tests/TestAppPlain/package.json /Users/antonis/git/sentry-react-native/performance-tests/TestAppSentry/package.json
2c2
<   "name": "TestAppPlain",
---
>   "name": "TestAppSentry",
10a11
>     "@sentry/react-native": "6.6.0",
17c18,19
<     "metro-react-native-babel-preset": "^0.72.3"
---
>     "metro-react-native-babel-preset": "^0.72.3",
>     "sentry-react-native-samples-utils": "workspace:^"

💡 Motivation and Context

Fixes #4426

💚 How did you test it?

Manua, CI

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

@antonis
Copy link
Collaborator Author

antonis commented Feb 10, 2025

There is a big bump in the Android binary size and and binary size diff that needs to be investagated

Arch App This PR Main Branch
legacy plainApp 45.35 MiB 17.75 MiB
withSentry 51.16 MiB 20.11 MiB
diff 5.81 MiB 2.36 MiB
new plainApp 45.35 MiB 7.15 MiB
withSentry 51.16 MiB 8.38 MiB
diff 5.81 MiB 1.23 MiB

@krystofwoldrich
Copy link
Member

Yeah, we should look into the Android diff before we merge this.

It's strange that the app with Sentry is now almost 6 MiB larger and before it was ~2 MiB.

Let's investigate the differences in the artifacts, and see what is causing the difference.

# Conflicts:
#	performance-tests/TestAppSentry/package.json
#	yarn.lock
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.

Upgrade performance test apps on the latest RN version
2 participants