We are using Spring OSGi on a platform that has limited resources ("embedded"). Going from "plain" OSGi to Spring-OSGi we found that startup time of our application (framework + bundles) has increased significantly (from 1m30s to 4m10s). After tracing we found that the biggest slowdown comes from the XML validation that the XmlBeanDefinitionReader performs.
As a test we patched
to configure the XmlBeanDefinitionReader to set validation mode to NONE, with the addition of 2 lines of code to the "loadBeanDefinitions" method:
The setNamespaceAware(true) was an unexpected necessity to make Spring understand alternate namespaces (e.g. "osgi:") within the context files.
With this patch to spring-osgi-core our startup time went from 4m10s to 1m40s on our hardware which has a poor CPU (300Mhz Intel Celeron).
This improvement request is to evaluate whether mainline Spring OSGI could not be enhanced with a configuration property that defaults to doing XML validation as it does now but allows users to turn off validation for production use.