require('react-native-svg') takes a long time on low end Android
See original GitHub issueI’m trying to optimize the launch time of my app and I found react-native-svg to be a bottleneck.
On a low end Nokia 2 running Android 7.1.1 in production mode I recorded the following lengths of time. 1449ms, 1292ms, 1285ms, 1215ms, 1178ms, 1167ms.
In my iphoneXR Simulator on a 2018 macbookpro I get 94ms, 89ms, 71ms, 67ms.
My monitoring code is:
const starttime = Date.now();
const reactNativeSvg = require('react-native-svg');
alert(Date.now() - starttime);
“react-native-svg”: “^6.3.1”, “react-native”: “0.57.3”,
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (1 by maintainers)
Top Results From Across the Web
require('react-native-svg') takes a long time on low end Android
I'm trying to optimize the launch time of my app and I found react-native-svg to be a bottleneck. On a low end Nokia...
Read more >How to show SVG file on React Native? - Stack Overflow
Since react native does not support the svg file format directly you need to follow some steps to get it working. 1. Install...
Read more >react-native-svg - npm
react -native-svg provides SVG support to React Native on iOS, Android, macOS, Windows, and a compatibility layer for the web.
Read more >Performance Overview - React Native
Any animations controlled by JavaScript would appear to freeze during that time. If anything takes longer than 100ms, the user will feel it....
Read more >Slow rendering - Android Developers
... UI thread work is taking for a long time, then you'll need to use Android ... Note: When recording a systrace, each...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
v9.0.0 has been released with these changes and various spec conformance fixes included.
@msand Hey! With Fabric + TurboModules + JSI coming up “sometime later this year” (hopefully), do you have a full rewrite for a rust implementation planned? I’ve noticed really slow performance when rendering complex SVGs such as react-native-bigheads, even on an iPhone 11 Pro. I don’t want to find out how slow it’s gonna be on a low end Android device.