Skip to content

Conversation

@hortont424
Copy link
Contributor

@hortont424 hortont424 commented Jan 14, 2026

c2ffa60

Enable compiled sandbox profile caching in macCatalyst builds
https://bugs.webkit.org/show_bug.cgi?id=305460
rdar://168126328

Reviewed by NOBODY (OOPS!).

Enable sandbox caching in macCatalyst builds. These builds use macOS style
sandbox profiles (loaded and applied at runtime, unlike iOS), and as such, benefit
from caching just like normal macOS WebKit.

This improves macCatalyst Web Process launch time by about 2 seconds (from 2.5s to 0.5s)
in my local testing.

* Source/WebKit/Configurations/WebKit.xcconfig:
* Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:

c2ffa60

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ✅ 🛠 ios-apple
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 loading-orange 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 loading 🧪 api-mac ✅ 🧪 api-wpe ✅ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 wpe-cairo-libwebrtc
✅ 🧪 api-ios ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🛠 tv ✅ 🧪 mac-intel-wk2
✅ 🛠 tv-sim ✅ 🛠 mac-safer-cpp
✅ 🛠 watch
✅ 🛠 watch-sim

https://bugs.webkit.org/show_bug.cgi?id=305460
rdar://168126328

Reviewed by NOBODY (OOPS!).

Enable sandbox caching in macCatalyst builds. These builds use macOS style
sandbox profiles (loaded and applied at runtime, unlike iOS), and as such, benefit
from caching just like normal macOS WebKit.

This improves macCatalyst Web Process launch time by about 2 seconds (from 2.5s to 0.5s)
in my local testing.

* Source/WebKit/Configurations/WebKit.xcconfig:
* Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:
@hortont424 hortont424 requested a review from emw-apple as a code owner January 14, 2026 08:45
@hortont424 hortont424 self-assigned this Jan 14, 2026
@hortont424 hortont424 added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label Jan 14, 2026
@hortont424 hortont424 requested review from pvollan, smfr and whsieh January 14, 2026 08:45
Comment on lines 81 to 85
#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
#define USE_CACHE_COMPILED_SANDBOX 1
#else
#define USE_CACHE_COMPILED_SANDBOX 0
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Weird that we define this here rather than in PlatformUse.h, though

Copy link
Contributor

@pvollan pvollan left a comment

Choose a reason for hiding this comment

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

Nice!

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

Labels

WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants