Impossible to set a custom service locator without scanning the classpath twice
Description
The classpath is always scanned twice when setting a custom ServiceLocator.
in the default ServiceLocator constructor (called by the static block initialization)
in the Custom ServiceLocator constructor if it extends the default ServiceLocator
Spring Boot is using a custom ServiceLocator (CustomResolverServiceLocator) in LiquibaseServiceLocatorApplicationListener$LiquibasePresent#replaceServiceLocator
In our app those 2 scans account for ~20% of the memory allocated at startup.
The classpath is always scanned twice when setting a custom ServiceLocator.
in the default ServiceLocator constructor (called by the static block initialization)
in the Custom ServiceLocator constructor if it extends the default ServiceLocator
Spring Boot is using a custom ServiceLocator (CustomResolverServiceLocator) in LiquibaseServiceLocatorApplicationListener$LiquibasePresent#replaceServiceLocator
In our app those 2 scans account for ~20% of the memory allocated at startup.