kotman12 commented on PR #1247:
URL: https://github.com/apache/curator/pull/1247#issuecomment-2692428155

   @tisonkun I think I agree .. IMO in a majority of cases the "initialized" 
variety is what you want even though there may be some minimal overhead of 
going through/checking two futures instead of one. I don't know at what scale 
that matters, if at all, but didn't benchmark it so didn't want to jump to 
conclusions.
   
   I'd be happy to refactor `CachedModeledFrameworkImpl` itself instead of 
adding another implementation. A benefit of this approach is that tests would 
be a lot simpler but I'm not sure if this is something that needs to be 
benchmarked? At any rate, this shouldn't introduce any backwards 
incompatibilities so not sure a major version bump is even needed to change 
`CachedModeledFrameworkImpl` to manage initialization.
   
   A third option is to make `InitializedCachedModeledFramework` the default 
cached implementation returned by `ModeledFramework::cached`. This would make 
the user-friendlier implementation more discoverable while also giving hardcore 
users the option to use the original, unitialized version.
   
   Of course I'll defer to the more experienced community here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@curator.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to