Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Blocked initialization with ui thread on application startup #27

Open
ypresto opened this issue Oct 8, 2013 · 0 comments
Open

Blocked initialization with ui thread on application startup #27

ypresto opened this issue Oct 8, 2013 · 0 comments

Comments

@ypresto
Copy link
Contributor

ypresto commented Oct 8, 2013

Initialization of large number of injection causes freeze on application startup.

On application startup, android initializes following order:

  1. ContentProvider
  2. Application
  3. Activity

Some of triaina-oriented android classes tries to do blocking initialization

  • TriainaContentProvider
  • TriainaApplication

These calls setBaseApplicationInjector() (directly, or via getInjector()) from GUI thread in onCreate().

Original roboguice has its own splash screen with application initialize capability.

https://code.google.com/p/roboguice/source/browse/roboguice/src/main/java/roboguice/activity/RoboSplashActivity.java?spec=svn0eaedd3ee5457fba323ec14e9a6c5f73c2c1facf&r=dc3f949dc64a695bcee965f19c8414df7f9f7674

(It shows splash every startups, improve might be required.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant