Repository navigation
perf(ios,apple): cache UINavigationBar styling and register objc_msgSend once for hot paths - #2747
Merged
oneo-me merged 2 commits intoNov 29, 2026
Conversation
…e purego hot paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oneo-me
force-pushed
the
perf/ios-navbar-cache-and-purego-hotpaths
branch
from
November 29, 2026 11:35
7e3d2eb to
80575dd
Compare
oneo-me
enabled auto-merge (rebase)
November 29, 2026 11:39
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.
Summary
Split out from #2716 per review feedback.
UINavigationBarcaching (internal/platform/ios/nav.go):UINavigationBarAppearanceand restyle a bar only when its header's style or collapsed state changes (barStyleChanged, with field-wisefontEqual/fontIsZeroasdriver.Fontholds maps).sizeThatFits:on every header change and when its width changes, but not again on a frame update at the same width.b.reportedtos.headers[0]/[1]on bar creation, the height core already lays a new screen out with, so a pushed screen dispatchesEventScreenHeaderonly when UIKit's height differs.objc_msgSendhot paths (internal/platform/apple,internal/platform/ios/ios.go,media.go):objc_msgSendforsetFrame:once ininternal/platform/apple, besidemsgSendFloat64on the samelibobjchandle, asapple.MsgRect, instead ofobjc.Sendregistering one on every call.apple.Msg(purego.SyscallN, no boxing intoany) on thecreate,insert,hiddenandlayerpaths.styleLayerBounddiffing, which lost decor borders and backgrounds, anddirection.go.Targets
core,base,ui,tsx, thensgotool)Screenshots
None
Verification
80575ddb33947e4685go tool nsgo check -target ios,macos -jobs 8→ 0go tool nsgo test ./internal/platform/apple/... ./internal/platform/ios/... ./core/...→ 0passChecklist
fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.changelog.d/fragment, not inCHANGELOG.md.🤖 Generated with Claude Code
🤖 Claude Opus 5.5