Now that #22420 we have a central location that we can use to investigate if an annotation index can be used to limit the number of methods we need to search.
Comment From: jhoeller
Alternatively, we could also just provide a registration SPI for annotation presence as originally sketched... and leave concrete index evaluation to the application's bootstrap code, so that Boot could evaluate any index format it wants on startup, simply populating the registration SPI with component class + annotation types found on it. If this is the path we'll take, let's narrow this ticket accordingly.
For 5.2 M2, we should make up our mind on this. The registration SPI prototype I had for AnnotationUtils.isCandidateClass
worked pretty well. However, we should put it onto its own SPI class so that it can be conveniently delegated to from both AnnotationUtils
and AnnotationsScanner
.
Comment From: snicoll
@philwebb reassigning to you as I understand you've been spiking on something lately.
Comment From: jhoeller
@philwebb I'll take the primary responsibility for this one, as per our discussion on Monday, adapting the scope of this ticket a bit. If there is concrete input towards an annotation index from Boot's side at some point, I'm happy to follow up on this one with such specific considerations in mind.
Comment From: philwebb
@jhoeller Sounds good, I'd like to experiment with a few index ideas but I'll just hack with it on a branch for now. If you have something for this already, I'd love to take a look.
Comment From: philwebb
My experimental branch is at https://github.com/philwebb/spring-framework/tree/gh-22578
Comment From: sbrannen
Team Decision: in light of the lack of progress on this issue coupled with the advent of AOT support in the core framework, the team has decided not to pursue an annotation index or related features.