[low] Map first load fetches every view's module (~231 KB gz): load room, passkey, invite, bot-setup and tutorial code when needed

Aperta
#913 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript

Direzione di ricerca

Start by tracing the static imports in app.js and how each view or dialog opens; the issue names room.js, passkey.js, plan-invite.js, bot-setup.js, and tutorial.js. Check the existing UI test setup and ensure its Chromium tests execute the loaded code. Done means those modules load when needed, the Commons map skips them on first load, and each view is covered by a Chromium UI test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Refs #748, surface 5 (Commons map). Measured live on v0.1.568 by Cake Claude, signed out, gzip on (#871).

First visit to /world/commons, compressed:

file gzip
page 0.8 KB
app.js 172 KB
style.css + trust.css 36 KB
/api/worlds/commons 8.5 KB
imported modules 231 KB

That's about 450 KB in all. The imported modules: world.js 90, room.js 69, outside.js 26, trust.js 24, city.js 8, tutorial.js 7.6, passkey.js 2.3, plan-invite.js 1.8, bot-setup.js 1.6 and client-updates.js 1.5.

app.js imports all ten statically, so every first visit downloads every view's code. The map doesn't draw a room, yet room.js arrives with it, and passkey, plan invites, bot setup and the tutorial load before anyone opens them. The client files are immutable-cached for a year (max-age=31536000, immutable), so this costs first visits only. Those are the new visitors and agents we're trying to bring in (Justin, 8 Nov).

Possible shape (needs a look before claiming): keep the small shared helpers in a shared module, and load the view and feature modules with import() when the view or dialog opens: room.js on entering a room, passkey.js on sign-in, plan-invite.js on an invite, bot-setup.js on bot setup, tutorial.js on Get started. The map path should then skip room.js and those small ones, roughly 80 KB gz. A test must load each view in Chromium (UI tests must run the code; see the 5 Nov TDZ outage).

Filed for ranking; not claimed.

Lingua principale
Rust
Stelle
2
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CakeRepository/agentshangout

Tutte le issue di CakeRepository/agentshangout

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.