Repository navigation
Conversation
4a85ab4 to
f63e9f4
Compare
…elog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f63e9f4 to
f7cac26
Compare
|
Rebased onto main ( Two follow-ups for @Heyana, not blocking:
🤖 Claude Opus 5.5 |
Head branch was pushed to by a user without write access
|
Thanks for the rebase and both catches @oneo-me! Addressed both in
Added native coverage in |
Summary
Pre-warm one clean spare
UINavigationBarduring idle main-thread time (after a short post-commit delay when a screen mounts or consumes the spare, and after a slide transition ends) and run one hiddenlayoutIfNeededpass while temporarily attached to the surface's window before detaching it, so the next route push does not pay UIKit's first-layout subview/backdrop initialization on the push frame.warmNavBar/scheduleWarmNavBar(internal/platform/ios/nav.go): allocates a freshnavBar, applies default appearance and placeholder[back, item], briefly attaches it hidden tos.native(when in a window) to runlayoutIfNeeded, then detaches and unhides it while leavingitemsSet = falsesoconfigureScreenstill sets the real screen's titles/items normally.scheduleWarmNavBardelays warming by50msviatime.AfterFuncbefore hopping toapple.OnMain(skipping if a slide is active) so warming stays off both the launch/root frame commit and push frames, andconfigureScreentriggers a refill whenever a new screen allocates or consumes a bar.applyDirection(internal/platform/ios/direction.go): keeps the detached spare bar in sync when app direction changes.close(internal/platform/ios/embed.go): cancels any pending warm timer and releases any held spare bar viareleaseSpareBar.TestSpareNavBarPrewarmAndConsume&TestScheduleWarmNavBarDelayedAndSkipsActiveSlide(internal/platform/ios/header_native_test.go): verify warming, detached/unhidden state, RTL propagation, consumption and refill scheduling inconfigureScreen, active-slide skipping, delayed idle warming, and cleanup.iOS Simulator measurements (
iPhone Duo,go tool nsgo test -target ios_simulator, N=30 alternating)layoutIfNeededP50main)layoutIfNeededlayoutIfNeeded(this PR)First cold push after
headerHeights()dropped from 63.130 ms (layoutIfNeeded61.798 ms) to 2.323 ms (config0.813 ms +layoutIfNeeded1.510 ms) on the push frame by moving the 61.764 ms initial UIKit layout into idle pre-warming.Targets
core,base,ui,tsx, thensgotool)Screenshots
None
Verification
8e8867f8d5ba6b14d5a236414ea748ca7d1dd12fd7a8f331bffb51f0e1adde97bd46aa6c5907cd6agofmt -l internal/platform/ios/ios.go internal/platform/ios/nav.go internal/platform/ios/header_native_test.go→ 0go test ./internal/platform/ios/...→ 0CGO_ENABLED=1 GOOS=ios GOARCH=arm64 go vet -tags nsgotest ./internal/platform/ios→ 0go tool nsgo test -target ios_simulator -device "iPhone 18 Pro" -timeout 2m -run '^Test(SpareNavBarPrewarmAndConsume|ScheduleWarmNavBarDelayedAndSkipsActiveSlide|NativeHeaderTitleAttributes)$' ./internal/platform/ios→ 0 (3 passed, 0 failed, 0 skipped)passphysical iOS device, tvOS/macOS cross-check, Android emulator, Windows, Linux, and browser jobsChecklist
fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.changelog.d/fragment, not inCHANGELOG.md.