Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
zuohuiyang opened this issue May 12, 2024 · 1 comment
Open
3 tasks done

Comments

@zuohuiyang
Copy link
Contributor

zuohuiyang commented May 12, 2024

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?

@JiaFuGuo
Copy link

I think it's very necessary too! In fact, in the electron 1.0 version of the time I have done so, but every time the face of the upgrade is very painful, strongly hope that the official support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants