Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Devtools panel freezes the page for minutes when the query cache holds thousands of observed queries

Offen
#11,149 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@cloudfluffy arbeitet bereits daran.

Seit 07.8.2026.

  • #11150 von @cloudfluffy — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
react, typescript

Rechercherichtung

Beginne mit dem im Reproduktionsfall beschriebenen Mounting-Pfad des DevTools-Panels und untersuche, wie gecachte Queries und Mutations zu Zeilen werden. Verfolge die Cache-Subscriptions, die von den Detailansichten und Status-Badges verwendet werden, einschließlich der wiederholten vollständigen Cache-Scans und Cache-Events. Verwende die verlinkte CodeSandbox mit Tausenden beobachteten Queries; fertig ist es, wenn das Öffnen und Offenhalten des Panels nicht mehr zu einem merklichen Freeze des Hauptthreads führt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Describe the bug

Opening the devtools against a QueryClient holding a few thousand queries blocks the main thread for minutes. The tab stops responding entirely — no scrolling, no clicks, no animation — and stays that way until the panel finishes mounting.

The panel renders one row per cached query and per cached mutation with no windowing, and each row registers several cache subscriptions, so the work done on open scales with the size of the cache rather than with what is visible. Several subscriptions also walk the whole cache on every cache event: the details panes resolve their selected item by scanning until they find a match, and the status badges count the entire cache once per status. Nothing throttles that, and each setQueryData emits two cache events, so an application that is still loading data keeps the panel re-doing all of it.

Your minimal, reproducible example

https://codesandbox.io/p/sandbox/brave-microservice-8kltf4

Steps to reproduce
  1. Open the example and let the list build for a few seconds.
  2. Press Open the devtools.
  3. Try to scroll the page. Nothing responds — the spinner stops and scrolling and clicks do nothing. The page stays frozen for minutes.
  4. When it recovers, the readout under the spinner reports the longest unbroken freeze.
Expected behavior

Opening the devtools should not block the main thread for a noticeable period, and keeping it open should not make the application unresponsive.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

OS: Windows 11
Browser: Edge
Version: 151.0.4129.59

Tanstack Query adapter

react-query

TanStack Query version

v5.101.4

TypeScript version

v5.9.2

Additional context

No response

Vorherrschende Sprache
TypeScript
Sterne
50.4k
Forks
4.2k
Ø Merge
7 Std. 29 Min.
Gemergte PRs (30 T.)
393

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TanStack/query

Alle Issues in TanStack/query

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.