jamesnetherton opened a new issue, #9390: URL: https://github.com/apache/camel-quarkus/issues/9390
`FastFactoryFinderResolver` is built by a `STATIC_INIT` recorder, which holds a `Class<?>` for every Camel service entry discovered on the classpath (`META-INF/services/org/apache/camel/**`). The recorder bytecode resolves each one with `Class.forName(name, true, cl)`. As a result, every service class is loaded and initialised at startup, whether or not the application ever uses it. That includes components, languages, data formats, configurers and transformers, for example `SpringCloudConfigConfigurationPropertiesConfigurer`. In JVM mode this step costs about 17–24ms and loads 200–290 classes in small apps such as `integration-tests/main`, `main-yaml` and `platform-http`. The cost grows with the number of extensions on the classpath. **Proposal** - Record the service class names instead of `Class<?>` objects, and resolve each class lazily on first lookup. - Keep the build-time `loadClass` check, so a service entry that points at a missing class still fails the build. **Measured (JVM, JDK 25)** - The `CamelBootstrapProcessor.factoryFinderResolver` step drops from 17–24ms to about 1ms. - Overall startup improves by 0–15ms in these apps, because some service classes are still loaded later when they're used. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
