From d2cc9909b27d638b8f1db8f063b60f69d8b5f6d8 Mon Sep 17 00:00:00 2001 From: Luke Page Date: Wed, 19 Aug 2020 22:10:20 +0200 Subject: [PATCH] Remove offscreen mode from new windows Fixes #7930 Offscreen rendering: https://www.electronjs.org/docs/tutorial/offscreen-rendering passes every frame to a 'paint' event, which cypress does not listen too. In electron 8.2.1 it was fixed and switched back on, so when cypress upgraded from 8.2.0 to 8.2.3, it caused a performance regression. The performance regression on slow computers is about 8x slower. On fast computers you don't see a difference - I expect the multi-process nature of electron and cypress means that more cores mitigate the extra cpu needed. The option was introduced here, 3 years ago: https://github.com/cypress-io/cypress/commit/5bde862d9122697dbab48156770950d4b58096f1 My guess is it was a mistake. @brian-mann do you remember? --- packages/server/lib/gui/windows.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/server/lib/gui/windows.ts b/packages/server/lib/gui/windows.ts index f44a7bb6ab24..f0b34590f785 100644 --- a/packages/server/lib/gui/windows.ts +++ b/packages/server/lib/gui/windows.ts @@ -145,7 +145,6 @@ export function create (projectRoot, _options: WindowOptions = {}, newBrowserWin if (options.show === false) { options.frame = false - options.webPreferences.offscreen = true } options.webPreferences.webSecurity = !!options.chromeWebSecurity