perf(ecs): per-frame copies, allocations and WASM crossings in run_systems and the zippers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp, wasm
- Ambito
- game-dev, performance
Direzione di ricerca
Read modules/ecs/wasm/Registry.hpp around lines 260–262 and 302–322 to trace run_systems and getZipper. First establish an e2e game performance measurement, since the issue says none has been taken. Compare the per-frame allocations and WASM crossings before and after the proposed caching and length-read changes; done means measured improvement without changing ECS behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Which package or utils is this feature request for?
ecs
Feature
The hottest path breaks the repo's rule against per-frame allocation, at a cost of entities × systems. Every frame copies the systems vector and creates a shared_from_this() JS wrapper per system. Each getZipper builds a std::map, a JS array and one JS object per matching entity, calls get_js_class_name twice per component (3–6 JS property reads each) and re-reads comps["length"] on each iteration. No measurement was taken yet.
Where:
Evidence:
std::vector<emscripten::val> systems_copy = _systems;
for (emscripten::val &system : systems_copy)
system(shared_from_this(), ctx);
Ideal solution or implementation
Copy the systems only when they change during a run, cache the class-name → array pointer lookup per constructor, and read length once. Measure before and after with the e2e game.
Alternative solutions or implementations
No response
Other context
Found during a code audit of main at be72076.
- Lingua principale
- TypeScript
- Stelle
- 7
- Fork
- 2
- Merge medio
- 1g 17h
- PR unite (30g)
- 17
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi 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 NanoForge-dev/Engine
-
dependencies enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NanoForge-dev/Engine#513 ·
I maintainer di solito rispondono entro 1 giorno
-
bug chore tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
NanoForge-dev/Engine#511 ·
I maintainer di solito rispondono entro 1 giorno
-
docs(network): TSDoc says ICE_SERVERS defaults to an empty list, the code uses public STUN serversApertadocumentation good first issue modules:network
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
NanoForge-dev/Engine#509 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation modules:ecs packages:asset packages:core
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NanoForge-dev/Engine#508 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue modules:music modules:sound
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NanoForge-dev/Engine#505 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NanoForge-dev/Engine
Issue simili
-
Mend: dependency security vulnerability
Difficoltà 1/5 1-3 ore Idoneità per principianti 65/100
fdm-monster/fdm-monster#5563 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
growilabs/growi#12246 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SSWConsulting/SSW.Rules#2809 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
automated-triage type/bug type/ci
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno