• Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • 1.1.0.CR1
    • None
    • None

      Currently the bootstrap is fairly coarse grained, not allowing the container to "skip" parts of bootstrap if it can provide the information externally.

      The primary goal here is to allow the container to skip the the bootstrap up until after all ProcessAnnotatedType events have been sent, and the modified class metadata has been built. My proposal for this is to introduce a new method to bootstrap that passes in a map of BDA->AnnotatedType that Weld can use to boot.

            [WELD-793] Make bootstrap more granular

            From what I can tell, the efficiency was mainly improved by parallelization (WELD-1069). I am fairly surprised this old issue is still open.

            The primary goal here is to allow the container to skip the the bootstrap up until after all ProcessAnnotatedType events have been sent, and the modified class metadata has been built. My proposal for this is to introduce a new method to bootstrap that passes in a map of BDA->AnnotatedType that Weld can use to boot.

            This would mean skipping parts of bootstrap dictated by CDI specification (i.e. extensions being able to modify the deployment) so it would probably only be useful on the assumption that you are restarting the app or re-deploying elsewhere without any change to the deployment.
            Also note that even then it is not really correct because for instance in EE container (WFLY), other internal parts can add CDI extensions that might want to process the deployment and you might, even inadvertently, enable or change other such WFLY extensions and then skip CDI bootstrap leading to unexpected state.

            smuctingly1989 what is the use case where you imagine this would make sense?

            Matěj Novotný added a comment - From what I can tell, the efficiency was mainly improved by parallelization ( WELD-1069 ). I am fairly surprised this old issue is still open. The primary goal here is to allow the container to skip the the bootstrap up until after all ProcessAnnotatedType events have been sent, and the modified class metadata has been built. My proposal for this is to introduce a new method to bootstrap that passes in a map of BDA->AnnotatedType that Weld can use to boot. This would mean skipping parts of bootstrap dictated by CDI specification (i.e. extensions being able to modify the deployment) so it would probably only be useful on the assumption that you are restarting the app or re-deploying elsewhere without any change to the deployment. Also note that even then it is not really correct because for instance in EE container (WFLY), other internal parts can add CDI extensions that might want to process the deployment and you might, even inadvertently, enable or change other such WFLY extensions and then skip CDI bootstrap leading to unexpected state. smuctingly1989 what is the use case where you imagine this would make sense?

            This approach could improve efficiency by allowing the container to leverage externally provided information and avoid redundant processing. 
            block blast    

            Karen Johnson (Inactive) added a comment - This approach could improve efficiency by allowing the container to leverage externally provided information and avoid redundant processing.  block blast    

            Fixing this as part of WELD-1069.

            Ales Justin added a comment - Fixing this as part of WELD-1069 .

              Unassigned Unassigned
              pmuiratbleepbleep Pete Muir (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: