Skip to content

devtools in v3.13.0 causing a lot of updates slowing down page execution #2019

@robherley

Description

@robherley

Describe the bug
After upgrading from v2 (react-query-devtools@v2.5.1) to v3 (react-query/devtools@v3.13.0) devtools seem to cause an extreme amount of updates that slows code execution. This happens with the devtools when they are both in the opened and closed state.

To Reproduce
Steps to reproduce the behavior:

  1. Render page with 50+ hooks in v2, start profile, update components, review profile.
  2. Render page with 50+ hooks in v3, start profile, update components, review profile.

Expected behavior
Less component updates.

Screenshots
If applicable, add screenshots to help explain your problem.

Here are two tests I ran where I completed the same exact actions with the same number of queries and same data being fetched. One version was using react-query@v2.23.0 with react-query-devtools@v2.5.1 and the other is react-query@v3.13.0. The newer devtools have more updates, so much that it causes code execution on the page to halt.

v2:
Screen Shot 2021-03-23 at 5 57 07 PM

v3:
Screen Shot 2021-03-23 at 6 00 44 PM

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: 89

Additional context

  • Disabling the devtools fixes slow page execution
  • "Worst" behavior is seen when multiple components with hooks are being unmounted/remounted

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions