Feature request: reuse the browser, server and page across renderStill calls

Aperta
#23 0 commenti 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
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
backend, tooling

Direzione di ricerca

Start by reading the implementations and call paths for renderStill, renderFrames, and renderMedia, especially where they start the static server, create the browser context and page, and close them. Compare the current shared-browser lifecycle with the requested caller-owned browser and multi-frame workflow; clarify the API and output-pattern behavior before implementation. Done means callers can control browser lifetime and render multiple frames without repeating page setup.

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

Descrizione

We render a lot of stills (thumbnails and frame checks), and each renderStill call has a fixed setup cost. It would help to be able to pass in a browser we own, like Remotion's puppeteerInstance, or even better to render several frames on one loaded page.

To be fair, renderStill does already reuse the shared browser: the same Browser instance served 10 calls in a row when I checked. But each call still starts a new static server, opens a new context and page, loads the bundle (networkidle), waits for __RENDIV_LOADED__ plus a fixed 100 ms, and then closes the page. For a trivial 320x180 composition that's about 0.8 s per still on my machine (Windows 11), and nearly all of it is setup.

Two things would help:

  • a browser option on renderStill (and on renderFrames and renderMedia for consistency), so callers control the browser's lifetime explicitly instead of relying on the module-level singleton and closeBrowser();
  • a way to render several frames in one call (e.g. frames: number[] with an output pattern), so the server and page are only set up once.
Lingua principale
TypeScript
Stelle
159
Fork
32
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 thecodacus/rendiv

Tutte le issue di thecodacus/rendiv

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.