sindresorhus / capture-website

Capture screenshots of websites
MIT License
1.93k stars 137 forks source link

Recommendation for multiple URL performance? #119

Open goldingdamien opened 10 months ago

goldingdamien commented 10 months ago

What is the recommended usage for optimized performance for multiple URLs?

My assumption is that a new instance of puppeteer is created with new browser and new page for each URL. Is this correct? Or are there optimizations made?

It would be nice if the same page could be used or some kind of page caching could be used for improving performance. Is this in any way possible?

Is https://github.com/sindresorhus/capture-website or https://github.com/sindresorhus/pageres better for multiple URL performance? Or is performance not optimizable for either, and so another library should be used instead?

Regards.

sindresorhus commented 10 months ago

There is currently no reuse of existing browser instances. That would be a nice optimization, but it's not something I have had time to do yet.