Skip to content

Defer more low priority tasks - #1853

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Nov 2, 2026
Merged

cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Deferring private AppKit menu initialization changes launch ordering, and selector-existence tests cannot establish safe launch and menu behavior without runtime validation on supported macOS versions.

No open issues 🎉

What changed in this PR

This PR defers additional low-priority startup work in MarkEdit’s macOS app, postponing AppKit menu setup and editor preloading.

Changes:

  • Defer main-menu customization and Open Recent menu installation through AppDeferredTasks.
  • Delay editor warm-up by 0.4 seconds for open panels and Quick Search windows.
  • Add runtime checks for the private AppKit selectors used by the new hooks.
File Description
MarkEditMac/​Sources/​Main/​Application/​Application.swift Register the two new menu-deferral hooks.
MarkEditMac/​Sources/​Main/​Application/​AppDelegate.swift Delay editor warm-up by 0.4 seconds.
MarkEditMac/​Sources/​Extras/​NSDocumentController+Extras.swift Defer Open Recent menu installation.
MarkEditMac/​Sources/​Extras/​NSApplication+Extras.swift Defer main-menu customization.
MarkEditMac/​Modules/​Tests/​RuntimeTests.swift Check that both hooked AppKit selectors exist.

Review effort: Balanced

@cyanzhong
cyanzhong merged commit cbba14c into main Nov 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants