Skip to content

Reduce Cold-Start Time by Deferring Non-Critical DI Graph Initialization #317

Description

@maugauwi-hash

Area: Performance
Priority: Medium
Estimated Time: 2 hours

Description:
EthosProtocolApplication.kt's Hilt AppModule likely eagerly initializes all singletons
(API client, offline cache, notification helper, integrity checker) at process start regardless of
whether the first screen the user sees needs all of them immediately, which can measurably affect
cold-start time.

Tasks:

  • Profile current cold-start time and identify which DI-provided singletons are on the critical path
    for first-frame render
  • Defer/lazily initialize non-critical singletons (e.g., IntegrityChecker, widget update scheduling)
    until after first frame
  • Add a startup-time benchmark (ties into #321) to measure the improvement and guard against regression

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions