Skip to content
CefSwift
Esc
↑↓navigate↵open⌘Jpreview
On this page

Startup

Linking the framework at launch, what every bundle does, and system notifications at launch.

# Prints launch time, process count and memory: median of five runs.
Scripts/measure-footprint.py Examples/dist/Minimal.app

What every bundle does

swift package cef bundle links the framework into the helper processes and the app executable, so dyld loads it at launch instead of CefKit loading it with dlopen. That keeps about 12 MB of the framework’s data as shared, clean memory in each process instead of private memory (architecture; design notes record the measurement). The Xcode build phase links the helpers the same way; an Xcode target’s own executable is not linked to the framework and loads it with dlopen (bundling).

Loading the framework at launch

swift package cef bundle links the framework into the app executable and the helpers, so dyld loads it at launch, instead of CefKit loading it with dlopen (architecture). With dlopen, each process holds about 12 MB of the framework’s data as private memory instead of clean, shared memory. The same apps before and after that change and the presets’ process settings (measure-footprint.py, median of five runs); linking at launch accounts for most of the difference:

App Processes Memory Launch
CefWebView with .embedded (the Minimal example), before 6 185 MB 276 ms
The same, after 5 88 MB 306 ms
Browser example, one tab (.chrome with its own name and scheme), before 8 371 MB 559 ms
The same, after 7 166 MB 551 ms

Launch times vary by about 30 ms from run to run, so neither change measurably changes them.

System notifications at launch

Observed on 2026-11-14 with CEF 156.0.28 on macOS 27.2, from the unified log (usernoted’s “Connection with path …” lines) and with UNUserNotificationCenter and NSUserNotificationCenter swizzled in SelfTest, in launches that only open a page.

With Chromium’s defaults, every launch, .embedded and .chrome alike, connected the app’s bundle and <App> Helper (Alerts) to usernoted within a second of start-up, before any page used notifications: Chromium gets NSUserNotificationCenter.defaultUserNotificationCenter in the browser process and starts the Alerts helper (for about 70 ms) as it sets up system notifications for the default profile. At an app’s first launch that is what shows two “would like to send notifications” banners. What stops it:

Change App connects Alerts helper starts Web notifications
None Yes Yes Through Notification Center
--disable-features=SystemNotifications No No Shown, in Chromium’s own popups (onshow fires, permission granted)
--disable-features=NativeNotifications No No The same
--disable-notifications Yes Yes Notification is undefined
LazyKeyedServiceInstantiation features on Yes Yes —

CefKit disables SystemNotifications unless services.systemNotifications is .automatic. No switch was found that keeps system notifications and defers the authorization request until a page shows one.

Other prompts, from tccd, locationd and mDNSResponder in the same launches: TCC saw only preflights (camera and microphone in both presets, Input Monitoring in .chrome), which never prompt; locationd registered a location client of the app’s, with no authorization request; nobody browsed for Bonjour services, so Local Network was not asked for; there was no Bluetooth request. The keychain is the mock keychain in ad hoc builds.

Was this page helpful?