🤖 perf: throttle sub-agent projection refetches after usage-changed events
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
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend, performance
Línea de trabajo
Start from the store code that refetches the open sub-agent projection on each usage-changed event, and from the getSubagentUsage call it makes. The issue names no files, so find them by searching for those identifiers. Add a per-ancestor trailing-edge throttle of about 1 s, or a backend view cache, then rerun the 200-writes-at-20/s benchmark with the parent shown and report fetch counts and CPU before and after. The second note, about the settling stream's ledger refetch double counting, needs a design decision first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
After #7867, the store refetches the open sub-agent projection once per usage write for each ancestor shown on screen (single flight, no delay). An independent verifier measured the cost for a large tree:
- One
getSubagentUsagefor 107 open sub-agents costs about 29 ms of server CPU (11 ms on the main thread). - 200 headless writes at 20/s with the parent shown cost 200 fetches and 9.16 s of server CPU over 11.6 s, against 2.10 s with the parent not shown.
- The estimate is 11-22% of the backend main thread per window showing a large root at 10-20 usage events/s, about 30-60× more fetches than before #7867.
Fix: a per-ancestor minimum interval between projection fetches (about 1 s, trailing edge, so the last change always lands), or a per-sub-agent view cache on the backend. Acceptance: rerun the 200-writes-at-20/s benchmark with the parent shown, report fetches and CPU before and after, and keep totals exact.
A second note from the same verifier: a workspace's own headless spend (bash AI proxy, status titles) now shows only when that workspace's own stream ends. The store skips its own ledger refetch during its own stream to avoid counting the stream twice. The final total is correct. Fixing this needs a refetch that cannot double count the settling stream.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.1k
- Forks
- 139
- Merge medio
- 4 h 38 min
- PR fusionados (30 d)
- 926
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin 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 coder/xum
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
🤖 fix: xum api exits 0 when a procedure returns success: falsePosiblemente ocupada @twotnguyen la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
coder/xum#7733 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Issues similares
-
[Bug]: t3 connect status reports "Exposure: enabled" for publish-only links without a tunnelAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
awslabs/visual-asset-management-system#1278 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
mifi/lossless-cut#3213 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 83/100
plasma-umass/scalene#1123 ·
Los mantenedores suelen responder en 1 día