Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

perf(producer): reuse pixel-identical consecutive upper DOM rasters in HDR compositor

Abierto
#5,005 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
performance

Línea de trabajo

Start by tracing the HDR layered path around Page.captureScreenshot(), the existing blitRgba8OverRgb48le() path, and domLayerCaptures. Add validation for the listed invalidation and failure cases, then confirm exact decoded-frame and audio equivalence while the cache remains limited to one RGBA frame and reports the requested counters.

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

Descripción

difficulty/hard enhancement triage/needs-design
Summary

After native HDR video is composited, an upper DOM overlay may remain visually identical across consecutive frames while the HDR background continues to change. The HDR layered path still performs a transparent full-page screenshot and PNG decode for every occurrence.

A bounded previous-state cache can reuse the decoded transparent RGBA overlay while rebuilding the HDR canvas normally for every frame.

Affected version

Observed in HyperFrames v0.8.114 (01c6f6004a00ecfa6e77ab4025b47a46a5e925fc). Please confirm whether current main has an equivalent DOM-raster cache.

Proposed scope

V1 should cache only:

  • the immediately previous strict state key;
  • one decoded RGBA upper-DOM buffer;
  • dimensions and minimal validation metadata.

It should not cache the RGB48 canvas, HDR video, final composite, encoded frame, audio, lower DOM, or a history of states.

On a hit, build the current HDR canvas as usual and blend the cached RGBA overlay with the existing blitRgba8OverRgb48le() path.

Strict pre-capture key

Reuse must be decided before Page.captureScreenshot(). The key should include the existing layer/stacking state and all raster-affecting state for the shown DOM subtree:

  • element and z-order identity;
  • visibility, opacity, geometry, transform, clip, and border radius;
  • text content and text-node rectangles for line wrapping;
  • attributes and raster-affecting computed styles;
  • pseudo-element content and styles;
  • image identity and readiness;
  • font readiness;
  • viewport and device-pixel state.

Unknown dynamic pixel sources should fail closed to a miss. Examples include canvas, SVG, video, running animations, custom elements/shadow DOM, CSS Paint API output, unloaded assets, and animated or unverified image formats.

Lifecycle and invalidation
  • one entry per page/render session;
  • exact key equality only;
  • miss invalidates the previous entry;
  • capture/decode/blit failure never promotes stale state;
  • dimension or buffer-size mismatch misses;
  • transitions and elementFilter captures stay disabled initially;
  • no persistent disk cache.
Observability

Add counters for hits, misses, actual screenshots, peak cache bytes, state-key time, and cached-blit time. domLayerCaptures should continue to mean real screenshots.

Validation

Tests should cover text/opacity/transform/src/z-order invalidation, unknown dynamic elements, key failures, stale-cache prevention after decode failure, transition exclusion, and the key correctness case: the HDR background changes while an identical upper raster is reused.

Acceptance should require exact decoded-frame equivalence to the uncached path and identical decoded audio. The cache should remain bounded to one RGBA frame.

Lenguaje dominante
TypeScript
Estrellas
54.1k
Forks
4.9k
Merge medio
1 d 16 h
PR fusionados (30 d)
725

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 heygen-com/hyperframes

Todos los issues de heygen-com/hyperframes

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.