Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

224
Visualizações
Why puppeteer animations runs *faster* than real-time?

I'm rendering animations with Puppeteer in AWS Lambda and I'm facing a strange behaviour: Puppeteer runs faster than real-time.

My animation takes 4 seconds on a regular desktop Chrome. When run in AWS-Lambda-Puppeteer it takes a range between 1 second to 4 seconds, depending on the viewport size.

Completely counter-intuitive, the bigger the viewport, the faster it runs. All the other variables are kept the same (CPU, mem, code, ...)

As expected, the code always generates 25 screenshots per second (whatever the viewport size), so 100 frames in 4 seconds. This makes me think that the node js code runs correctly in real time.

Using a viewport of 300x200, the animation takes 4 seconds and all 100 frames contain the animation.

When I change to a viewport of 600x400, the animation plays faster and takes less than 2 seconds, so the first 50 frames have the animation and the last 50 frames are static with the last animation frame.

As I increase the viewport size, the speed increases up to less of a second.

Does anybody know if there's an explanation and a solution for this?

Additional notes:

I don't think it's a problem with my code, as it creates the frames as expected. It seems more a Puppeteer behaviour / setting.

By the way, I'm taking screenshots using the regular:

page.screenshot({
   omitBackground: true
});
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda