Repository navigation
Conversation
…ents # Conflicts: # ios/Sources/TodayShell/HomeView.swift # ios/Sources/TodayShell/Sidebar.swift
…dOptimizationTests
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.
Comprehensive end-to-end iOS performance optimization across launch, shell, Today/Calendar rendering, Ask/AI chat, Reminders/Search/Clock/Health/Activity/Settings, sync, SQLite storage, and shared UI primitives:
Launch, Shell & Navigation
cities.jsondisk read/JSON decode/ICU folding out ofOneApp.init()via asyncWorldClockStore(citiesURL:...)with fast home-zone fallback.BackupController.discover()andBackupController.save()off@MainActor, eliminate redundant archive re-validation, and stop triggering backups on foreground/non-change activity flushes.session.calendar.version,AskOverlayModel, anddrawer.isOpenout ofHomeView.bodyso calendar bumps, Chat open/close, and drawer slides never invalidate the entire shell.bootstrap()vs initialscenePhase == .active, offload outbox import and daily-gatedActivityStore.prune, and eliminate the 250ms pre-build race beforeprepareNewAsk().YearMarksCacheandMonthMarksCacheonHomeViewso lens switches preserve computed calendar caches; deferChatAutoArchive.runpast the sidebar open spring and short-circuit idle thresholds before N+1 queries..maskrender pass inDrawerMainSlidewhen closed (p == 0) using aShapeclip.Today, Calendar & Shared UI Rows
@ObservableYearSlot, cachedYearLayout.blank, static 4×3 grid,EquatableMiniMonth, gated.accessibilityChildren, precomputed day IDs, andText(verbatim:)inCanvas.CalendarEntries.makebucketed intoEquatableDayColumns,Canvashour lines, isolatedWeekNowLine/WeekNowLabelminuteTimelineView(removing 60s full-grid timer), cachedsecondCityand 24 hour labels, and scroll-isolatedAllDayRow.Timer.publish(sleep until next midnight/one-off alarm), per-monthMonthSlot, lazy foldedMonthFoldpager, coalescedAgendaRowTracking, detachedMonthAgendaList.load(), and O(days + entries)MonthSummary.summarize.ActivityCenter.observePlanswith in-memory dedup cache, async off-@MainActorDayHistory.loadAsync+ O(N)reconstruct, O(1)TodayFocussettled index & memoizedreference(_:).DateFormatters inTimeColumn,PlannerConsumerTime,TravelTimes,MonthLabel,AlarmPlan.timeParts,plannerDayLabel, andQuickTime; cacheCalendarTimeZone.city(stored:); hoist duplicate per-row locals inTaskRow/EventRow/ExternalEventRow; replaceViewThatFitsinTitleDetailwith a single-treeLayout.Ask / AI Chat & Core Parsers
RegexCacheacross allTodayCoreparsers &AgentPlannerTools.foldwith ASCII fast paths.@Querys from permanently-mountedAskView, isolateAskComposerState(draft/quick) from conversation rendering, gateDraftMatchesHoston>= minimumLength, avoid unnecessarywithAnimationon unchanged quick drafts, and batch per-turn SwiftData saves.FastLane.looksLikeEdit/localPreviewlazily evaluateeditItems(), optimizeJSONValue.parse&LunaStreamDecoder(zero thrownDecodingErrors on ignored deltas), add zero-allocationJSONValue.utf8ByteCountand O(1)AgentHistory.shortID, and cacheAIService.credentialsin memory.Reminders, Search, Clock, Health, Activity, Settings, Sync & SQLite
RemindersStats,#Predicatelist queries, lazySearchResultsHost@Querys with match-before-EventKit-filter, cachedWorldClockStore.home/others, conditionalAlarmsSectionView@Querys, 120HzTimeWheelPickercaches, single-passHealthMetricDetailsnapshot + O(D+N) slidingMovingAverage+ bounded reverseHealthSpark.slots, off-@MainActorActivityView/ActivityDataViewSQLite queries, and dark-mode single-render / isolated section@AppStorageinSettingsView..EKEventStoreChanged, superset-interval cache hits inCalendarSync, entity-filteredModelContext.didSave+ concurrentfetchRemote()+ background >30d probe inRemindersSync, O(1) calendar fast-forward inRecurrence.occurrences+nextOccurrence, diffedReminders.resync(), off-mainAlarmManager.shared.alarms, coalesced off-mainWidgetFeed+ 2-day cachedbutlerDay(),#Predicatesingle-record fetches,ActivityStoreMigration 3 composite indexes + PRAGMAs + prepared statement cache + batchedevents(forSubjectRefs:), and off-main periodicActivityRecorderflushes.SpeedOptimizationTestscovering recurrence fast-forward/DST parity,JSONValue/LunaStreamDecoder,AgentHistory.shortID, lazyFastLane,SearchMatch,RegexCache,ActivityStorebatched queries, andTodayFocusStoreindexing.