Great news! The classindex <https://github.com/atteo/classindex> library just added the ability to get a list of all annotated class *names*, without actually loading the class. This would allow us to lazy load all our classes that are annotated with @AutoBInd. Now the missing piece is figuring out how to delay the classloading in Guice ...
On Wednesday, October 29, 2014 12:19:24 PM UTC+1, stephanos wrote: > > Hey there, > > we are using Guice on App Engine. One trick we have used is to annotate > all classes we want to bind to Guice with @AutoBind and use the fantastic > classindex <https://github.com/atteo/classindex> library to simply read > them all from a compile-time generated file. No classpath scanning! > Unfortunately, as we were adding class after class, now the Guice setup > takes around 1.5 seconds. In a cloud environment where instances are > constantly started and shut down this has a big impact. The profiler tells > us that classpath loading is responsible for the lion share. > > So long story short: How to delay the classloading until it is really > needed? Something like bind("com.example.MyClass")? > > Regards > Stephan > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/1f7d7d75-3cc1-4447-a44e-147ee7fa71ce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
