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

Abierto
#913 1 comentario 0 reacciones 0 asignados Ver en GitHub

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
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
2
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CakeRepository/agentshangout

Todos los issues de CakeRepository/agentshangout

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.