[RUM] The Logs page is 2% of views but 31% of >500ms main-thread frames — a non-virtualized, index-keyed table re-renders every row per live flush
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend, performance
Línea de trabajo
Start with src/features/instance/log/LogsDataTable.tsx, then read src/features/instance/log/hooks/mergeReadLogs.ts and src/features/instance/log/hooks/useInstanceLogs.ts to trace row identity and update frequency. Check the table's row keys and rendering behavior with live log updates, then investigate TanStack virtualization. Done means the table keeps updates responsive at the stated log limits and production RUM blocking time improves after release.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The instance Logs page (/<org>/<cluster>/logs and …/instance/<id>/logs) is Studio's worst main-thread hotspot in production RUM. It is about 2% of production views but produces 31% of all long-animation frames with more than 500ms of blocking time. Single frames reach 10–20s of blocking, so the tab freezes.
Datadog RUM findings (production fabric.harper.fast, last 15 days)
Long-task data only goes back ~15 days, so there is no older baseline. This is a measured hotspot, not a proven regression.
| Logs views | Every other view | |
|---|---|---|
| Views | 140 | 7,120 |
Frames with >500ms blocking (@long_task.blocking_duration) |
122 | 272 |
| Sessions with such a frame | 17 of 80 Logs sessions (21%) | — |
- Logs-view p95
blocking_duration: 808ms over 2026-10-26 → 11-09. 3,026ms in the 24h ending 2026-11-10, but that window had only 2 sessions. - Daily heavy-frame counts on Logs are bursty: 2 / 5 / 3 / 0 / 0 / 0 / 0 / 42 / 0 / 33 / 3 / 0 / 0 / 34 (10-26 → 11-10). Each burst comes from a long-open Logs tab.
- Attribution of frames where
scripts[]names exactly one host, as in #1684:- Studio's own bundle: 35 frames, 14 sessions, 78.8s total blocking. Mostly
vendor-tanstack-*.js(@tanstack/query-corenotifyManagerin the dev file names) andvendor-react-*.js. On every other view, Studio's own bundle never produces more than 3 such frames per view. www.redditstatic.com/ads/pixel.js(loaded by GTM): 52 frames, 4 sessions, 60.5s. In 15 days, every heavy Reddit-pixel frame landed on the Logs view and none on any other view. The pixel is not slow in general. Something about this page makes it slow.- Multi-host frames of 10–20s that mix
fbevents.js,gtm.js,vendor-datadog,vendor-reactandvendor-tanstack.
- Studio's own bundle: 35 frames, 14 sessions, 78.8s total blocking. Mostly
Likely cause (hypothesis, not yet verified in a browser)
LogsDataTable renders every entry (default limit 1,000, live retention up to max(2000, limit) in useInstanceLogs) into a table that is not virtualized. useTable gets no getRowId, so row ids, and therefore React keys, are array indexes.
mergeReadLogs returns the list newest-first. Each new line is prepended, which shifts every index. React then rewrites the text of every cell in every row, not just the new one. The SSE tail does this up to every 250ms (FLUSH_INTERVAL_MS), and the polling fallback every 5s.
That explains both signals:
- Studio's own cost: reconciling and committing about 1–2k rows × N cells per flush.
- The third-party cost: whole-table DOM churn feeds every
MutationObserver/DOM-scanning tag that GTM injects (Reddit pixel, Facebook). That would explain why the Reddit pixel only blocks here.
Suggested fix
- Pass
getRowIdtouseTable, built from the identitymergeReadLogsalready computes (logKey). A prepend then mounts only the new rows and leaves existing DOM nodes untouched. - Virtualize the table body, e.g.
@tanstack/react-virtual, which fits the TanStack Table that is already in use. This bounds DOM size whatever the limit. - Re-measure Logs-view
blocking_durationp95 and heavy-frame share after the fix ships. The Reddit-pixel frames should disappear as well if the hypothesis holds.
Related: #1684 (marketing tags on /sign-in), #1762 (Reo double-load).
Reproduce the numbers
pup rum aggregate --query "@application.id:<studio> @type:long_task @view.url_host:fabric.harper.fast @view.url_hash:*logs @long_task.blocking_duration:>500000000" --compute count --from 15d --to now
pup rum events --query "… same, without the view filter" --from 30d --to now --limit 5000 # then group by single-host scripts[].source_url
🤖 Generated by Claude Code (Claude Opus 5.5); posted via @dawsontoth.
- Lenguaje dominante
- TypeScript
- Estrellas
- 5
- Forks
- 4
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 60
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de HarperFast/studio
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
HarperFast/studio#2111 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
HarperFast/studio#2109 ·
Los mantenedores suelen responder en 1 día
-
rum
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
HarperFast/studio#2085 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
HarperFast/studio#2070 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
HarperFast/studio#2067 ·
Los mantenedores suelen responder en 1 día
Todos los issues de HarperFast/studio
Issues similares
-
area: batch
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
inabagumi/shinju-date#7294 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
streaming-video-technology-alliance/common-media-library#700 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
vercel-labs/ui#809 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
KrisCris/village-in-the-shade-guide#75 ·
Los mantenedores suelen responder en 1 día
-
bot:ai-assisted component:platform-js status:untriaged
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
midnightntwrk/platform-js#38 ·