Vaadin Flow in some cases uses class path scanning that scans through all available resources. This is done here https://github.com/vaadin/flow/blob/7e51a3a5a3a9f4b8774201ee0aaf0c7058275a3e/vaadin-spring/src/main/java/com/vaadin/flow/spring/VaadinServletContextInitializer.java#L870-L873 where packages only contains ""
.
With Vaadin 24.8 + Spring Boot 3.5 + Spring Framework 6.2, the output for a test project looks like
2025-06-25T18:15:29.016+03:00 INFO 25803 --- [ restartedMain] c.v.f.s.VaadinServletContextInitializer : Search for subclasses and classes with annotations took 2633 ms
With Vaadin 25.0 + Spring Boot 4.0 SNAPSHOT + Spring Framework M1 or SNAPSHOT, the output looks like
2025-06-25T18:14:32.777+03:00 INFO 22966 --- [ restartedMain] c.v.f.s.VaadinServletContextInitializer : Search for subclasses and classes with annotations took 33513 ms
The number of resources it scans through seems to be roughly the same (10.5K vs 10.9K) so has something else changed that would affect performance 10X? I am not sure even where to begin digging - in Vaadin code or in Spring code.
Comment From: Artur-
Seems a bit like public MetadataReader getMetadataReader(String className) throws IOException
in CachingMetaDataReaderFactory
does not actually cache anything but creates a new metadata reader every time
Comment From: bclozel
Thanks for reporting this @Artur-, I think this was an oversight in gh-33616, let me have a look.
Comment From: bclozel
Thanks @Artur- for the investigation and sorry for the inconvenience. This should be restored now in the next SNAPSHOTs. Keep the feedback coming, we really appreciate it!