Skip to content

refactor(producer): centralize frame filenames and consolidate timing#1420

Closed
miguel-heygen wants to merge 3 commits into
refactor/extract-hdr-compositorfrom
refactor/consolidate-patterns
Closed

refactor(producer): centralize frame filenames and consolidate timing#1420
miguel-heygen wants to merge 3 commits into
refactor/extract-hdr-compositorfrom
refactor/consolidate-patterns

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Three pattern consolidation changes:

  • Add formatCaptureFrameName / formatExportFrameName helpers, replacing 4 inline padStart(6) sites
  • Hoist allElementIds out of the per-layer compositing loop (perf: 1 map call instead of N per frame)
  • Add timeHdrPhase / timeHdrPhaseAsync wrappers to hdrPerf.ts, replacing ~28 boilerplate timing blocks

448 LOC (251 insertions, 197 deletions)

Stack: 4/5

Replace 4 inline padStart(6) template literals with shared helpers:
- formatCaptureFrameName(index, ext): zero-based, for internal capture
- formatExportFrameName(index, ext): zero-based input, one-based output
  for user-facing png-sequence export
Move fullStacking.map() from inside the per-layer iteration to before
the loop, computing the element ID list once per frame instead of once
per DOM layer per frame.

miguel-heygen commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

@miguel-heygen miguel-heygen changed the title refactor(producer): centralize frame filename construction refactor(producer): centralize frame filenames and consolidate timing Jun 13, 2026
@miguel-heygen miguel-heygen marked this pull request as ready for review June 13, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant