On Sep 15, 7:08 pm, Sam Berlin <[email protected]> wrote:
> On a somewhat related, but mostly different note, in profiling & performance
> tuning we've seen a lot of overhead from Provider.get calls.  This is
> usually related to a lot of creation of throwaway Errors objects.  I'm not
> sure what, if anything, can be done about this.

Hmmm...

Would you be interested in seeing what happens if you pool the Errors
objects? You'd need to go through the code and find hot calls to "new
Errors()" with something to pull them from a cache, plus something
else to return unused ones to the cache. If you try this and get
sizable performance improvements, I'll accept a patch!


> In the case of AssistedInject there's even worse overhead by trying to bind 
> objects to the
> parent injector that will always fail & then be created in the child
> injector.  In those instances, I think an additional
> InjectorBuilder.setJitBindingsEnabled(false) API would do wonders (and also
> solve a lot of conceptual difficulties people have had with child injectors
> adding bindings to the parent).

Yeah, AssistedInject is currently a bit of a mess internally. Sooner
or later I'd like to change it from using child injectors to use the
new 'toConstructor()' API introduced after Guice 2.0. Since nobody
else is actively working on this at the moment, patches are welcome
here.

By the way, I'm sorry that I still haven't done anything about the old
patches you've posted to our bugtracker. It's tricky business trying
to balance the API between exposing enough power, and exposing too
much! I'm still thinking things over, and in general I'd like to be a
Good Open Source Project and accept good patches.

Thanks again buddy,
Jesse

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to