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

Use v8 instead of JSC + native SVG support #1196

Merged
merged 5 commits into from
Nov 13, 2019
Merged

Use v8 instead of JSC + native SVG support #1196

merged 5 commits into from
Nov 13, 2019

Conversation

brunobar79
Copy link
Contributor

@brunobar79 brunobar79 commented Nov 13, 2019

This PR was an attempt to fix the crash happening when going to settings, which took me to try react-native-v8 instead of JSC. Performance is way better, as seen here.

After that, I realized the crash was still there and it wasn't JSC fault, so I kept digging until I found it was being caused by react-native-remote-svg while rendering the webviews outside of the viewport (basically the tokens elements that were below the fold). Since the webview wasn't visible android was attempting to remove it from the view stack when other view was displayed on top (ex. going to settings), causing a memory leak that would lead to a crash, and it resulted to be our # 1 crash!

That has been fixed by removing the dependency from react-native-remote-svg and use react-native-svg instead, which now supports remote svgs too and it renders them natively.

I've wrapped into a component RemoteImage that we should use to load external images.

TL;DR: The app is way faster and we fixed the main crash.

@brunobar79 brunobar79 added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Nov 13, 2019
@brunobar79 brunobar79 changed the title Use v8 instead of JSC + new SVG Use v8 instead of JSC + native SVG support Nov 13, 2019
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 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 amazing, huge difference

Crash no longer happens on android, and performance is notably better, double thumbs up here, QA PASSED

Copy link
Contributor

@estebanmino estebanmino left a comment

Choose a reason for hiding this comment

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

👏 👏

@brunobar79 brunobar79 merged commit a5d2347 into develop Nov 13, 2019
@estebanmino estebanmino deleted the android-v8 branch February 4, 2020 15:58
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* use v8 instead of JSC

* replace react-native-remote-svg for react-native-svg

* fix svg size

* update snapshots

* clean up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Any New Features that needs a full manual QA prior to being added to a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants