ios - Initializing Typhoon factory faster with large number of beans -
i've around 150 components in 4 typhoon assemblies. initialize typhooncomponentfactory
these assemblies on app launch, , long depending on number of components , tagrget idevice.
for example, component mill initialization takes around 1200ms on iphone4 , 600ms on iphone 5s.
is there way speed component mill initialization ?
the 'assembly' style of instantiating typhoon designed following:
incur main performance nail @ initialization time, , fast possible @ runtime. provide much convenience , ease of utilize possible.its been while since profiling, guess 2 features biggest performance penalty are:
auto-wiring:
there new auto-wiring feature released part of typhoon 3.0. while still private on main branch , exists in typhoon 2.3.x versions. adds 25% overhead. yesterday feature pushed allow turning off auto-wiring.
collection scanning:
typhoon has next behavior collections (nsarrays, sets, etc):
any references other components result in built component beingness injected. otherwise plain objects, configurations , scalar values injected is. . while feature has potential cause performance impact, in typical assembly, there not many collections has noticeable effect.this allows simple , intuitive dsl, requires scanning each collection value, adds overhead. have many collections in assembly?
typhoon 3.0:
we'll doing profiling part of typhoon 3.0 release. in meantime, if have performance perhaps raise github issue , we'll seek address them.
most minimal typhoon (not recommended normal cases):
as final point on performance: besides assembly style of using typhoon, if startup performance of particular concern utilize typhoon in bare/minimal state using typhooncomponentfactory
directly, much more verbose , doesn't have built-in ide refactoring, code-completion, ability resolve components using assembly interface (with our without runtime args), etc.
ios objective-c iphone performance typhoon
No comments:
Post a Comment