spring-ai
spring-ai copied to clipboard
move eager initialization of `PgVectorStore` from `afterPropertiesSet` to `ApplicationListener<ApplicationReadyEvent>`
at the moment there is initialization done on every run of PgVectorStore, which delays the startup time significantly. (more than double my normal startup time)
It would be good to:
a) make this an opt-in, as it is in Spring Modulith, Spring Session, Spring Batch, Spring Integration, Spring Session, etc.
b) move it to a later point in the Spring Boot application lifecycle, like ApplicationListener<ApplicatinoReadyEvent>, instead of afterPropertiesReady. this way, it'll happen after the boot app has reported its startup time