sting-ioc / sting

Home Page:https://sting-ioc.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Split the injector constructor when many eager components are present

realityforge opened this issue · comments

Other injector code generation frameworks break up the constructor so that components are initialised in smaller methods. Presumably this is to improve the compiler performance in some environments (Android?). i.e. Dagger seems to break up the component initialisations into blocks of 100.

This was implemented in Sting but it had no measurable build time or code size performance impact on either the GWT compiler or the javac compiler. This has since been removed to simplify the code generator and simplify the generated code. It is unclear if this is ever needed in modern environments.

After experimenting with several largish applications, with 1000s of components this seems to be a non-issue in the web context. It is possible this may have an impact in Android but as we are not targeting this atm we will close the issue for now.

It can be re-opened if it ever becomes an issue