Currently, I have PuppeteerSharp running on a .NET Core Azure Function on Linux Consumption Plan. My local runs in 6-11 seconds. The azure function one runs in 25 - 40 seconds (this is after cold start). I'd like to bring back that time as much as possible - hopefully while staying within the realm of Azure or Cloudflare. I am not against moving to node (not using PuppeteerSharp, just straight puppeteer) if necessary.
I've heard that running in Azure Container instances might provide better results. But one of my requirements is that the serverless API scales up/down with load (and obviously the price fluctuates with the load). I am not building a screenshotting service - it is essentially running a hefty browser app, running some processes, and saving some output from it.