tolmasky / lithograph

Puppeteer-first Super Fast Testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Only launch Puppeteer if browser is needed

tolmasky opened this issue · comments

We need to see how this affects performance. It would make lithograph much more viable for unit testing. Worst case scenario, flag to turn browsers off.

Curious about your thoughts regarding how this would work (though I don't quite know how things work at the moment) — I guess we could just not launch Puppeteer at all until a Puppeteer API is called? (and then keep puppeteer/browser around for the rest of the run, assuming that the OS can manage things properly?)

Yes what I want to try first is just not launching Chrome instances until they are requested. The main question for me is whether the startup time of Chrome will cause significant regressions for our tests that all know ahead of time that they want to make use of Chrome instances. However, I think we currently wait for all instances to boot up before starting any tests, so this may end up working itself out. The main downside scenarios are when you have tons of files that don't make use of Chrome and then one that does, the Chrome instance could have been booting up in parallel theoretically.