Skip to content

Commit

Permalink
fix: rendering is slow in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
hkonsti committed Jun 9, 2024
1 parent 6489db2 commit b1cc4dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/renderer/server/render-video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ async function initBrowserAndServer(
settings: RenderVideoSettings,
params?: Record<string, unknown>,
) {
const args = settings.puppeteer?.args ?? [];
args.includes('--single-process') || args.push('--single-process');

const [browser, server] = await Promise.all([
puppeteer.launch({headless: true, ...settings.puppeteer}),
puppeteer.launch({headless: true, ...settings.puppeteer, args}),
createServer({
configFile: resolvedConfigPath,
server: {
Expand Down

0 comments on commit b1cc4dd

Please sign in to comment.