You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browser: Reproduced in Chromium, unsure about other browsers
Extra: Nothing in particular
Code Snippet
import{chromium}from"playwright";(async()=>{constvideosPath="./videocapture";// Make sure this directory existsconstbrowser=awaitchromium.launch({headless: true,// Headless or headful makes no difference});constcontext=awaitbrowser.newContext({
videosPath,// Omitting videosPath makes browserContext.close take a few milliseconds});constpage=awaitcontext.newPage();awaitpage.goto("https://www.google.com");// browserContext.close takes around 1 sec if only this page is loadedawaitpage.goto("https://www.vg.no");// browserContext.close takes around 4 secs if this and preceding pages are loadedawaitpage.goto("https://www.dagbladet.no");// browserContext.close takes around 5 secs if this and preceding pages are loadedawaitpage.goto("https://www.aftenposten.no");// browserContext.close takes around 9 secs if this and preceding pages are loadedawaitpage.goto("https://www.dagsavisen.no");// browserContext.close takes around 18-31 secs if this and preceding pages are loadedawaitpage.close();awaitcontext.close();awaitbrowser.close();})();
Describe the bug
When recording videos with the new stable video recording API, I find that closing browserContexts scales badly with video length. The snippet above provides a minimal reproducible example. I haven't tested very thoroughly, but enough that I am confident that there are some performance concerns here that should be addressed.
I would expect that saving a video should add much less overhead to browserContext.close than shown above, which https://github.com/qawolf/playwright-video manages to do pretty well.
The text was updated successfully, but these errors were encountered:
Context:
Code Snippet
Describe the bug
When recording videos with the new stable video recording API, I find that closing
browserContext
s scales badly with video length. The snippet above provides a minimal reproducible example. I haven't tested very thoroughly, but enough that I am confident that there are some performance concerns here that should be addressed.I would expect that saving a video should add much less overhead to
browserContext.close
than shown above, which https://github.com/qawolf/playwright-video manages to do pretty well.The text was updated successfully, but these errors were encountered: