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.

Is React busy when idle?

See original GitHub issue

I’m using React as the UI layer on WebGL Projects.

See for example: https://github.com/dakom/ball-bounce-frp

My concern is that React/ReactDOM might be doing stuff unexpectedly due to the new improvement to take advantage of idle time.

Does React do anything while ReactDOM.render() and setState() are not being called?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gaearoncommented, Jun 20, 2018

Only if you schedule low-priority work (the exact mechanism is to be determined).

React won’t make random stuff slower by spending idle time just because it can. 😃 The idea is that if something doesn’t need to be synchronous then it’s better to do it in deferred chunks. React won’t create more work for itself out of thin air.

It’s the same amount of work overall, so if it’s not async, then it’s sync and blocks the thread.

1reaction
gaearoncommented, Jun 18, 2018

React doesn’t do anything in idle time by default in the version 16.

In the future, reconciliation for some state updates might be deferred to idle time instead of being processed synchronously. There will likely be an API to opt into or out of this, but the specifics aren’t decided on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Idle Session Time out in React - Baljinder Singh - Medium
The session will be handled by a logical clock monitoring the user's interaction with the application. There will be a prefixed time value...
Read more >
Android: CPU busy when application idling #15868 - GitHub
Little to no CPU usage when application is idling. Actual Behavior. Quite a bit of CPU while application is idling. Reproducible Demo. Any...
Read more >
React Idle - Modus Labs
Boost performance of busy React applications by improving above the fold component rendering priority. React-idle decreases work on the execution thread by ...
Read more >
React native run stays in IDLE state - Stack Overflow
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details NDK is missing a "platforms" directory.
Read more >
react-idle-timer - npm
Welcome to the all new IdleTimer! The documentation has moved to https://idletimer.dev. There you can find everything you need to get started ...
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