Skip to content

ArC - Optimize Beans#getCallbacks() #49653

@gsmet

Description

@gsmet

Beans#getCallbacks() is called several times, as part of generating the bean bytecode support code and also as part of BeanInfo#hasDestroyLogic().

Moreover, I suspect collectCallbacks could be optimized by getting the AnnotationInstances for the whole class instead of testing each method separately.

So two things:

  • Should these callbacks be part of BeanInfo or BeanDeployment and collected once and for all?
  • Iterating over all the methods is probably a bad idea given we have Jandex around and it can get us all the class annotations in one go i.e. use ClassInfo#annotations(DotName name).

I'm not doing this now as @Ladicek is working on rewriting ArC to Gizmo 2 so I prefer not be in his way. It's probably worth some discussion for the first item anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/arcIssue related to ARC (dependency injection)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions