Shrink the page collector bundle: parse5 and preact are 92% of it
Los mantenedores suelen responder en 1 dí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
- Estancado
- Stack tecnológico
- typescript
Línea de trabajo
Start with the collector preload and the transform path in packages/app, then trace the current parseDocument round trip and vnode wire shape across the four adapters. Verify the examples and #403's headed reproduction; done means the page bundle is well under 50 KB while DOM capture, replay, and the A11y tab remain unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Blocks #403, where a headed Chrome 154 session hangs on the first navigation
because the collector preload is 213 KB. That bisect showed the cost is payload
size alone, superlinear per script, and that our code is not implicated: 213 KB
of comment hangs identically.
The mitigations all cost something. Chunked registration needs the source
rebuilt from string parts and evaled, which a strict script-src CSP blocks,
so it trades a headed hang for silently losing DOM capture on exactly the pages
most likely to be real applications. Fetching the collector from the backend has
the same CSP exposure, and the JS service starts no backend in trace mode. A
preload script's body bypasses page CSP; anything evaluated from a string does
not. So the only route with no downside is to register less code.
What the bundle is
| bytes | share | |
|---|---|---|
| parse5 | 148,535 | 69.5% |
| preact / htm | 47,549 | 22.2% |
| the collector itself | 17,717 | 8.3% |
Why the two big ones are there, and why they need not be
parse5 serves a round trip the page does not need. parseDocument reads
node.outerHTML, serialising the live DOM to a string, then parses that string
back into a tree. The collector is already standing in the document. Walking the
nodes directly produces the same tree without the serialize/parse pair, and is
strictly cheaper at capture time as well.
preact/htm builds vnodes the app does not consume as vnodes. transform in
packages/app reads the wire shape and calls h() itself, so the page side only
has to emit plain { type, props } objects.
Removing both takes the preload from 213 KB to roughly 18 KB, which the #403
bisect measures at baseline navigation cost.
Acceptance criteria
The page bundle registers well under 50 KB. DOM capture, replay and the A11y
tab are unchanged across all four adapters, verified on the examples rather than
by unit tests alone, since this is the fidelity-critical path. #403's headed
reproduction passes.
Size: L. The serializer is delicate and shared by every adapter, so this wants
its own verification pass rather than riding along with another change.
- Lenguaje dominante
- TypeScript
- Estrellas
- 10
- Forks
- 2
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 23
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 webdriverio/devtools
-
capture-architecture enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
webdriverio/devtools#402 ·
Los mantenedores suelen responder en 1 día
-
Cross-adapter conformance suite for capture invariantsQuizá libre de nuevo @vishnuv688 la tomó hace 51 días y no hay ningún pull request abierto. Abiertocapture-architecture enhancement
webdriverio/devtools#300 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Generate contract types, not just scope namesQuizá libre de nuevo @vishnuv688 la tomó hace 51 días y no hay ningún pull request abierto. Abiertocapture-architecture enhancement
webdriverio/devtools#299 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Spike: how to avoid re-implementing capture per languageQuizá libre de nuevo @vishnuv688 la tomó hace 51 días y no hay ningún pull request abierto. Abiertocapture-architecture
webdriverio/devtools#298 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Epic: Cross-language capture architectureQuizá libre de nuevo @vishnuv688 la tomó hace 51 días y no hay ningún pull request abierto. Abiertocapture-architecture
webdriverio/devtools#278 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de webdriverio/devtools
Issues similares
-
bug HemiStake
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
hemilabs/ui-monorepo#2413 ·
Los mantenedores suelen responder en 1 día
-
component/ui framework/react kind/bug language/javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
meshery/meshery#22216 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
company delete fails with 500 on any company that has activity (cost events, inbox dismissals)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
paperclipai/paperclip#14982 ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
lingdojo/kana-dojo#31515 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día