General Guidelines

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

After completing the functionality of the tool, I determined that the performance was non-standard, and began profiling with a simple hprof.

This indicates that simply creating an Injector is a significant performance problem. I generally do no real work in Modules and reserve computational intensive work for Providers ...

With that in mind, what are some general performance recommendations for Guice? Should I avoid using @AssistedInject and FactoryModuleBuilders? Avoid @Singletons if possible? Make sure all bindings are explicit and avoid JIT bindings?

I searched everything but can't find much addressing Guice's base performance other than those who say it very quickly.

+5
source share
1 answer

Firstly, your question is poor. What is non-standard performance and how did you decide what that means? Is this arbitrary? Do you have a user who thinks this is too slow? Should I start or take too long to get results from user interaction?

Without real evaluation code, it is difficult to debug performance issues. Here are some tips from my experience:

  • . , REST, . , API 15 . , , .

  • , . , , ( ) - .

  • , Guice - , , . Guice , , (. 1). , , , , - .

, , Guice, , ​​ Dagger, Square ( 1) Google ( 2). , , .

+3

All Articles