Open GoogleCodeExporter opened 9 years ago
You've done an awesome job on this already. I would add one area where we can
make a marginal
improvement:
Detect disjoint singleton chains and allow them to be constructed in parallel.
Currently, we take a lock on
Injector.class for constructing singletons. This is pretty bad. Firstly we only
need to take a lock per injector
tree (i.e. all child injectors must lock on the same lock as the root
injector), this helps disjoint injector trees
live in the same process in parallel (or, live happily in the forest =).
Secondly, we can apply the same principle to singleton object graphs that are
disjoint. This allows multiple
threads to run concurrently in the same injector tree (for example, creating +
starting n number of rpc
servers).
Original comment by dha...@gmail.com
on 27 Jun 2009 at 2:17
Original comment by sberlin
on 22 Feb 2011 at 1:52
Original issue reported on code.google.com by
limpbizkit
on 27 Apr 2009 at 6:26