Skip to main content

Child dependency performance

Issue summary

A child dependency is performing inefficiently, causing delays in resolving multiple parent components that rely on it. This creates bottlenecks in component initialization and slows down overall app performance.

Why it matters

Because many components depend on this slow child dependency, its poor performance cascades throughout the app, resulting in widespread slowdowns and degraded user experience. Identifying and fixing these issues can be challenging without proper diagnostics, leading to longer development and maintenance cycles.

How issues are detected

An issue is raised whenever the resolution time of a child dependency exceeds 5 ms per call.
When detected, this issue is not considered critical, it appears in the Issues View of the console but does not trigger notifications.

How to fix a child dependency performance issue

Since the Kotzilla platform has identified slow child dependencies during component initialization and runtime, your focus should now be on analyzing these specific components (especially their initialization code and runtime execution) and understanding how their performance affects the broader dependency graph.

Focus on:

  • Prioritizing optimization efforts on the flagged slow dependencies
  • Reducing the impact of these dependencies on parent components
  • Simplifying and decoupling complex dependency chains to improve overall performance
  1. Prioritize optimization of critical dependencies
    Focus on optimizing the slow dependencies first. This can include caching frequent results, optimizing algorithms, or moving resource-intensive work off the main thread. Adjust Koin configurations where possible—for instance, switch from factory to single for dependencies that don’t need repeated instantiation, reducing overhead.

  2. Reduce dependency complexity
    If a child dependency is particularly heavy, consider refactoring it by breaking complex logic into smaller parts or decoupling components through interfaces and abstractions. Simplifying dependencies improves maintainability and performance resilience.

  3. Implement efficient resource management
    Ensure that dependencies performing heavy computations or resource access (e.g., database or network operations) use lazy initialization, efficient caching, and asynchronous processing to minimize blocking and reduce execution time.

Use the Kotzilla SDK API and Console to investigate

The Kotzilla Console provides detailed visibility into child dependency performance, helping you pinpoint which specific dependencies cause slowdowns.

Use the Timeline view to analyze resolution times and dependency graphs for each user session. The SDK API enables custom instrumentation to trace and profile slow dependencies for deeper investigation.

For full setup and usage, refer to the Kotzilla SDK API documentation.

Use AI-powered contextual prompts

In addition to the Timeline and SDK API, you can use prompt generation capabilities of the platform with your favorite AI coding assistant to get fixes directly within Android Studio or the Console.

Need help?

Struggling to fix slow child dependencies? Our experts are ready to help you optimize your app’s dependency graph for better performance. Reach out anytime for best practices and pro tips!