Updates on extremely slow and clog main thread with React-Native Android using chrome debugger
See original GitHub issueHey guys, While using realm for RN Android, I’m trying to write/update around 50 of objects like:
realm.write(() => {
results.forEach(function (dict, i) {
realm.create('MyObj', {
pk: dict.pk,
someProp: dict.someProp
})
})
})
Without debugging in chrome it’s lightning fast, but when I debug in chrome, it takes around half a second to write each object, blocking the UI, and rendering the app completely unresponsive for over 20 seconds. Any idea of why this is?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:11 (5 by maintainers)
Top Results From Across the Web
React Native Android Slow Performance without Chrome Debug
The issue is that my app works fine (fast) when chrome debug is on. The moment i turn off the remote debugger, the...
Read more >Why app gets slow in Debug mode, React Native
When we use Debug JS Mode while developing React Native app, App gets very slow, JS Frame rate gets dropped. Each button click...
Read more >Debug your React Native app performance issues - Bam Tech
Debug lags, scroll bugs, and React Native performance issues with the Chrome profiler and Flipper.
Read more >How do I minimize main thread work? - Blog - Marfeel
It's in the main thread where most of this is processed. The main thread parses HTML and CSS to apply specified styles for...
Read more >React Native: Understanding Threads. | by Brooklin Myers
React Native is multi-processed. · UI Thread. This process is used for handling rendering android and ios views. · JS Thread. This process...
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
I use chrome dev tools only for showing
console.log()
output. I’ve found that Mac OS console logging tool is working with Realm much more faster. Use$ react-native log-ios
or$ react-native log-android
in your terminal. https://facebook.github.io/react-native/docs/debugging.html#accessing-console-logsIt also happens on IOS Simulator