[Bug]: Project favicon lookup probes ~30 paths one at a time, so a slow disk stalls assets.createUrl for a minute
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend, performance
Direzione di ricerca
Inizia da apps/server e segui assets.createUrl fino a ProjectFaviconResolver.resolvePathUncached, quindi esamina come vengono verificati e prioritizzati i 21 percorsi noti e i 7 file sorgente. Riproduci il caso del filesystem lento, se possibile; il lavoro è completato quando una ricerca a freddo verifica i candidati in concorrenza, mantiene l’ordine di priorità ed evita il ritardo sequenziale segnalato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Area
apps/server
Steps to reproduce
- Run the server on a host where filesystem calls are slow (in my case a WSL2 host under heavy memory and I/O pressure, where one
stattook 1 to 4 seconds). - Open a client so that it requests project favicon asset URLs (
assets.createUrl).
Expected behavior
A favicon lookup costs about one filesystem round trip, because the probes do not depend on each other.
Actual behavior
ProjectFaviconResolver.resolvePathUncached probes 21 well-known paths and then 7 source files one after the other. A miss costs about 30 sequential filesystem calls, so the request time is 30 times the latency of one call. The cache added in #9080 does not help a cold lookup, and a miss stays cached for only 1 minute.
Numbers from server.trace.ndjson during the slow period:
| Span | Count | Median | Max |
|---|---|---|---|
ws.rpc.assets.createUrl |
72 | 38.6 s | 79.4 s |
One slow call, by child span:
ws.rpc.assets.createUrl 77697 ms
AssetAccess.issueAssetUrl 77648 ms
WorkspacePaths.normalizeWorkspaceRoot 1241 ms
ProjectFaviconResolver.resolvePath 60149 ms
ProjectFaviconResolver.resolvePathUncached 60140 ms
findExistingFile 1942 ms
findExistingFile 1781 ms
findExistingFile 2274 ms
findExistingFile 4420 ms
... (one span for each candidate, in sequence)
ServerSecretStore.getOrCreateRandom 1435 ms
Impact
On a slow disk or a loaded host, project icons and every other assets.createUrl call for a project favicon wait for a minute or more. The host was the root cause of the slowness in my case, but the sequential walk multiplied it by 30.
Version or commit
0.0.43-nightly.20260918.1895. The code is the same on main at 0f1b572b9.
Environment
Linux (WSL2), server run as a service.
Workaround
None. A proposed fix probes the candidates concurrently and keeps the priority order.
- Lingua principale
- TypeScript
- Stelle
- 23.2k
- Fork
- 5.9k
- Merge medio
- 10h 57m
- PR unite (30g)
- 365
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pingdotgg/t3code
-
bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
accepted bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
accepted bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
accepted bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
accepted bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Tutte le issue di pingdotgg/t3code
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
fullcalendar/fullcalendar#8106 ·