Repository navigation
Conversation
electron-context-menu (with electron-dl, cli-truncate, ext-name and friends) was imported and configured in configureApplication, before Chromium was ready. It attaches to every existing and future window, so loading it right after restoreWindows() gives the same menus without its dependency tree on the startup path. Packaged build, warm service, median of 6 launches: first main-process log line 401 -> 381 ms after spawn.
Hona
added a commit
that referenced
this pull request
Sep 19, 2026
The context menu call lived in configureApplication and was lost when that moved to the entry module. Install it after restoreWindows(), where electron-context-menu attaches to existing and future windows alike, which also keeps its dependency tree off the startup path (#49794).
Member
Author
|
Folded into #49869: the early-window entry moves configureApplication, and the context menu now installs after restoreWindows() there. |
Hona
added a commit
that referenced
this pull request
Sep 19, 2026
The context menu call lived in configureApplication and was lost when that moved to the entry module. Install it after restoreWindows(), where electron-context-menu attaches to existing and future windows alike, which also keeps its dependency tree off the startup path (#49794).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
\configureApplication\ imported \�lectron-context-menu\ at module level and called it before \�pp.whenReady(). In the Chromium startup trace its dependency chain (\�lectron-dl, \cli-truncate, \�xt-name, \�moji-regex, …) is the block of
equire()\ events right before our own chunks evaluate.
\�lectron-context-menu\ attaches to every window that already exists (\BrowserWindow.getAllWindows()) and to future ones (\�rowser-window-created), so it does not need to be configured before windows are created. This moves it to \installContextMenu, run in
unIpc\ right after
estoreWindows(); the options are unchanged.
Measured with \�un run bench:startup\ (#49758): packaged \�2\ build, isolated home, warm service, median of 6 launches.
Same family as #49791 / #49792: third-party CommonJS on the pre-ready path.