`BrowserWindow.loadFile` in electron 8.x is very slower than 2.x

It takes about 3 seconds from startup to running main.js. But from BrowserWindow.loadFile to did-finish-load, it can take up to 8 seconds,and electron 8.x is slower than 2.x.

I used the 8.x version and it took more than 11 seconds to start. Can someone help me to see how to improve it? Why does vscode start so fast?

Environment

  • CPU: i7-7700
  • RAM: 16G
  • SSD: 256
  • System: windows 10 pro 64x - 1909

from BrowserWindow.loadFile to did-finish-load

electron version loadFile time
2.x 2s+
3.x 2.5s+
4.x 5s+
5.x 4.5s+
6.x 5s+
7.x 6s
8.x 6s

source code