Build speed regression between 65 to beta.66
See original GitHub issuePre-flight checklist
- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project uses.
- I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
6.0.0-beta.66
Electron version
19.1.4
Operating system
macOS 11.7
Last known working Electron Forge version
6.0.0-beta.65
Expected behavior
electron-forge start takes the same amount of time before/after v66
Actual behavior
electron-forge start takes 3x longer
Steps to reproduce
https://github.com/electron/forge/compare/v6.0.0-beta.65...v6.0.0-beta.66
old output — takes 30 seconds to 1 minute, computer does not hang
➜ yarn start
yarn run v1.22.19
$ cross-env APP_CHANNEL=development electron-forge start
✔ Checking your system
✔ Locating Application
✔ Preparing native dependencies: 4 / 4
✔ Compiling Main Process Code
✔ Launch Dev Servers
✔ Compiling Preload Scripts
✔ Launching Application
Webpack Output Available: http://localhost:9000
new output — takes 2-3 minutes and the computer hangs a few times/fan spins up (output seems different)
➜ yarn start
yarn run v1.22.19
$ cross-env APP_CHANNEL=development electron-forge start
✔ Checking your system
✔ Locating Application
✔ Preparing native dependencies: 4 / 4
✔ Compiling Main Process Code
⠋ Launch Dev Servers⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code⠋ Compiling Renderer Code✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Compiling Renderer Code
✔ Launch Dev Servers
✔ Compiling Preload Scripts
✔ Launching Application
Webpack Output Available: http://localhost:9000
package.json
"@electron-forge/cli": "6.0.0-beta.66",
"@electron-forge/maker-appx": "6.0.0-beta.66",
"@electron-forge/maker-dmg": "6.0.0-beta.66",
"@electron-forge/maker-zip": "6.0.0-beta.66",
"@electron-forge/plugin-auto-unpack-natives": "6.0.0-beta.66",
"@electron-forge/plugin-webpack": "6.0.0-beta.66",
We compile a lot of renderer windows, and share the preload between them all (maybe this pattern isn’t good and is what the issue is?)
forge.config.js
[
'@electron-forge/plugin-webpack',
{
mainConfig: './webpack.main.config.js',
devContentSecurityPolicy: '',
renderer: {
config: './webpack.renderer.config.js',
entryPoints: [
{
html: './src/renderer/index.html',
js: './src/renderer/windows/index.tsx', // We can remove this in beta.69 or so!
name: 'main_window',
preload: {
js: './src/main/preload.ts',
},
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_0>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_1>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_2>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_3>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_4>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_5>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_6>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_7>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_8>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_9>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_10>',
},
{
html: './src/renderer/index.html',
js: '<snip>/index.tsx',
name: '<snip_11>',
},
],
},
},
]
Additional information
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
The Regression Equation | Introduction to Statistics
It is the value of y obtained using the regression line. It is not generally equal to y from data. The scatter plot...
Read more >A guide to modeling proportions with Bayesian beta and zero ...
Everything you ever wanted to know about beta regression! Use R and brms to correctly model proportion data, and learn all about the...
Read more >11Simple Linear Regression and Correlation - LEG/UFPR
Use simple linear regression for building empirical models to engineering and scientific ... 11-66. Suppose data is obtained from 20 pairs of (x,...
Read more >Introduction to Time Series Regression and Forecasting
Forecasting models built on regression methods: oautoregressive (AR) models oautoregressive distributed lag (ADL) models oneed not (typically do not) have a ...
Read more >Chapter 15 Linear regression | Learning statistics with R
As it turns out, the β β coefficient for a predictor X X and outcome Y Y has a very simple formula, namely...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it’s the change that makes
getRendererConfig
return multiple configs. Passing multiple configs towebpack()
is the same as runningawait Promise.all(configs.map(config => webpack(config)))
under the hood. I think we can dramatically speed this up again.Old: 1 renderer config New: N renderer config Proposed: Max 2 renderer configs, we should bucket entry points into 2 configs. One for nodeIntegration and one for not.
Ah, I was able to find the issue!
tl;dr is that
fork-ts-checker-webpack-plugin
slows the build based on the number of renderer processes with the above linked commit.If I remove the
fork-ts-checker-webpack-plugin
, then my typescript/webpack compilation takes a lot longer—the app will boot as soon as it did previously, viaapp.on('ready')
, but webpack will still be compiling my renderers, which means theBrowserWindow.on('ready-to-show')
event can take up to another 30 seconds after theapp.on('ready')
event was fired.Here are the steps
forge.config.js
:webpack.renderer.config.js
:yarn start