question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updates on extremely slow and clog main thread with React-Native Android using chrome debugger

See original GitHub issue

Hey 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:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
nulleofcommented, Sep 10, 2016

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-logs

0reactions
anativcommented, Jun 14, 2016

It also happens on IOS Simulator

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found