I currently have a command-line tool that uses Guice and its extensions fairly heavily.

After completing the functionality of the tool, I've determined that the performance is sub-standard, and started profiling using simple hprof.

This has pointed out that just creating the Injector is a significant performance problem. I generally avoid doing any real work in Modules, and reserve compute intensive work for Providers...

With that given, what are some general performance guidelines for Guice? Should I avoid using @AssistedInject and FactoryModuleBuilders? Avoid @Singletons if possible? Ensure that all bindings are explicit and avoid JIT bindings?

I've searched all over, but can't really find much addressing basic Guice performance other than people saying it's really fast.

Edit
Report