Skip to content

refactor: add more AnkiDroidApp profiling and refactor startup#21294

Merged
criticalAY merged 3 commits into
ankidroid:mainfrom
david-allison:more-startup
Jun 22, 2026
Merged

refactor: add more AnkiDroidApp profiling and refactor startup#21294
criticalAY merged 3 commits into
ankidroid:mainfrom
david-allison:more-startup

Conversation

@david-allison

Copy link
Copy Markdown
Member

In particular, this adds AnkiContext as a means to order dependencies. I plan to add CrashReportingContext in a follow-up PR

Fixes

## Testing

Timber config: DEBUG
AnkiDroidApp: listing debug info
executed setupContextMenus in 885.5us
executed makeBackendUsable in 164.584us
AnkiDroidApp: Starting Services
executed setupNotifications in 8.013542ms
executed setupAppLifecycleObserver in 101.375us
executed setupBackendChangeManager in 7.502458ms
executed setupAnkiBackend in 1.263500ms
executed initializeAnkiDroidDirectory in 1.301166ms
executed setupDayRollover in 7.674542ms
executed setupLifecycleLogging in 539.584us
executed setupTextToSpeech in 1.201458ms

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Once i18n is setup, the backend is usable
 use a context as a marker to define a dependency
 ordering on methods which require this

Part of 20168

@lukstbit lukstbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, for the changes with a question for the new object.

Comment thread AnkiDroid/src/main/java/com/ichi2/anki/AnkiDroidApp.kt
@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jun 22, 2026

@criticalAY criticalAY left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@criticalAY criticalAY added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Jun 22, 2026
@criticalAY criticalAY added this pull request to the merge queue Jun 22, 2026
Merged via the queue into ankidroid:main with commit 1bcc20b Jun 22, 2026
20 checks passed
@github-actions github-actions Bot added this to the 2.25 release milestone Jun 22, 2026
@github-actions github-actions Bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Jun 22, 2026
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.

3 participants