I am using puppeteersharp (C# port of puppeteer) chromium headless mode to generate pdf from html.
By default it passes some default args to chromium.
Default args are available at below link in constant name chromeArguments
https://github.com/puppeteer/puppeteer/blob/main/src/node/Launcher.ts
After going through the discussion at google group
I have added additional args along with default args.
--disable-notifications,
--disable-translate,
--safebrowsing-disable-auto-update,
--remote-debugging-port=9222,
--disable-setuid-sandbox,
--disable-gpu,
--user-agent=true,
--hide-scrollbars,
--no-sandbox,
--no-zygote,
--autoplay-policy=no-user-gesture-required,
--disable-logging,--disable-permissions-api,
--disable-databases,
--ignore-certificate-errors,
--ignore-ssl-errors,
--ignore-certificate-errors-spki-list,
--mute-audio,
--run-all-compositor-stages-before-draw,
--no-default-browser-check
If I am using puppeteer for converting html to pdf only , which all additional options are required in respect of getting good performance (min memory and cpu usage)?
Or If above is not possible is there any way I can limit memory usage from c# for background process for chromium?