electron/electron

[Feature Request]: Splitting Electron into a small EXE and a large DLL

zuohuiyang opened this issue · 1 comments

Preflight Checklist

Problem Description

N/A

Proposed Solution

Splitting the large electron.exe into smaller EXE and larger DLL files, with most of the code placed within the DLL while the EXE acts as a shell to load the DLL, offers two benefits:
1、The EXE can speed up the application startup by preloading the DLL. In our product's testing (used by several million users), preloading resulted in a 180ms improvement in the PCT50 startup speed.
2、If the EXE is used as a launcher, the DLL and other program files can be placed in a versioned subdirectory. This structural design provides advantages for installation, uninstallation, and upgrades. During installation and uninstallation, there are often mysterious file occupation issues. Isolating the files in a versioned directory can increase the success rate of installation and uninstallation. Keeping a separate EXE outside the versioned directory maintains a unified entry point for the application. In certain scenarios, such as OEM pre-installation, maintaining a fixed location for the EXE is necessary. In the context of updates, having a separate EXE launcher is beneficial for implementing silent updates.

Additionally, Chrome follows a similar approach.
c:\Program Files\Google\Chrome>tree /F

└─Application
│ chrome.exe
│ chrome.VisualElementsManifest.xml
│ chrome_proxy.exe
│ initial_preferences

├─124.0.6367.158
│ │ 124.0.6367.158.manifest
│ │ chrome.dll
│ │ chrome.dll.sig
│ │ chrome.exe.sig
│ │ chrome_100_percent.pak
│ │ chrome_200_percent.pak
│ │ chrome_elf.dll
│ │ chrome_pwa_launcher.exe
│ │ chrome_wer.dll
│ │ d3dcompiler_47.dll
│ │ dxcompiler.dll
│ │ dxil.dll
│ │ elevation_service.exe
│ │ eventlog_provider.dll
│ │ icudtl.dat
│ │ libEGL.dll
......

Alternatives Considered

N/A

Additional Information

I would like to know how the official community perceives this Feature Request. If the community deems this feature feasible, I am interested in taking up its development. Could you please advise me on the appropriate process to follow? For instance, should I start by submitting an RFC (Request for Comments) document?