Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!