thomasdondorf / puppeteer-cluster

Puppeteer Pool, run a cluster of instances in parallel
MIT License
3.26k stars 313 forks source link

Concurrency launch: CONCURRENCY_BROWSER definition slightly misleading #520

Open goelayu opened 1 year ago

goelayu commented 1 year ago

Not sure if others would agree, but I felt the definition of CONCURRENCY_BROWSER that every URL is launched in a new browser using the incognito context, seemed misleading to me.

Technically, it spawn one browser per worker, and creates a new incognito context (and a new page) per URL.

Spawning an entirely new browser per URL, would significantly inflate the loading cost (in terms of CPU usage) of each URL (as per some of my experiments).

tehandyb commented 1 year ago

It says CONCURRENCY_BROWSER launches one browser per url, and CONCURRENCY_CONTEXT launches an incognito page per url. So if what you're saying is true, and it only spawns one browser per worker, I would agree the docs should be updated :)

goelayu commented 1 year ago

Yes, CONCURRENCY_BROWSER launches one browser per worker, and not per URL. @thomasdondorf feel free to update the READme if you agree.

localhost-MouhannadlrX commented 3 months ago

Agree with you @goelayu