After messing with this more, I was able to trim down the number of bindings (and therefore creation listeners) to ~50, but the binding validation still takes just as long. Any recommendations on how to trim down the run time of InjectorBuilder.initializeStatically()? Is this a known bottleneck, or am I doing something unique? I plan on working around it by creating a splash screen for the user, but any light that can be shed on this would help.
Cheers, -T On Sun, Aug 15, 2010 at 10:25 PM, Todd Volkert <[email protected]> wrote: > Hi all, > > I'm writing a client app that uses Guice, and I'm having difficulty > with the startup time. Some basic analysis (turning on Guice logging) > shows that the bulk of the time is spent in > InjectorBuilder.initializeStatically(): > > FINE: Binding initialization: 362ms > FINE: Binding indexing: 2ms > FINE: Collecting injection requests: 0ms > FINE: Binding validation: 2752ms > FINE: Static validation: 8ms > FINE: Instance member validation: 1ms > FINE: Provider verification: 9ms > > Further analysis shows that I have almost 300 creation listeners, > which is why the validation is taking so long. > > I'm going to try to trim down the quantity of bindings that I have in > the app (I'm creating them dynamically), but I was wondering if > there's any other way around this (such as a more lenient validation > strategy or skipping validation altogether). On the server, this > wouldn't be an issue, but given that this is a client app (and I > necessarily create the injector in the event dispatch thread), the app > is unresponsive to the user for several seconds, which is > unfortunate. Can someone lend any insight? > > Thanks! > -T > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
