Skip to content

Keep unopened iOS previews and drawer panels off the launch path - #262

Merged
tiensonqin merged 1 commit into
mainfrom
perf/defer-ios-file-preview
Oct 23, 2026
Merged

tiensonqin merged 1 commit into
mainfrom
perf/defer-ios-file-preview

Conversation

@tiensonqin

Copy link
Copy Markdown
Collaborator

Closed drawers currently mount their hidden sidebar, including its NavigationStack, and the SwiftUI QuickLook preview modifier eagerly links the file-preview framework before any preview request. Both add work before the first content frame.

Keep compact drawer panels unmounted until their first reveal, then retain them across closes. Use UIKit's native document preview on iOS so QuickLook loads when a file is opened; keep the existing macOS preview. Handle dismissal during presentation and suppress duplicate wire dismiss events.

On the same iOS 26 simulator with the same isolated Lambda Journals fixture, five fresh-process Release runs reduced pre-main median from 383ms to 276ms with demand-loaded previews. Deferring the closed drawer reduced view creation median from 217ms to 174ms. These are simulator/local-renderer measurements, not a claim that the full app has reached its 300ms launch target.

Validation:

  • Native simulator checks verify QuickLook is absent before a request, PDF preview opens/closes/reopens correctly, native dismissal emits once, and retained wire nodes do not reopen.
  • Native drawer checks verify closed panels stay unmounted, first reveal uses current data, initially open panels render, and reopen preserves state.
  • The mobile 300-row drawer harness passes six transitions without rebuilding content or losing scroll identity/offset; initially open and regular-width cases pass.
  • Release iOS and macOS backend builds pass; the consuming mobile app's 104 Swift UI tests pass.

Run the standalone checks with the commands in platform/apple/Tests/RuntimeChecks/README.md. No XCTest invocation is required.

Based directly on freshly fetched main (9a8de61).

@tiensonqin
tiensonqin merged commit 273c5a9 into main Oct 23, 2026
7 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.

1 participant