Hi all,

I just joined the mailing list today and would like to propose an
improvement to the Aries JAX-RS Whiteboard.

While debugging my application, I was looking for ways to reduce startup
time. I’m working on a relatively large OSGi enterprise application based
on CXF and Karaf. The application uses around 30–40 REST endpoints, which
are registered into CXF by the Aries JAX-RS Whiteboard.

>From what I’ve observed, the current implementation of the JAX-RS
Whiteboard rewires CXF each time a new service is added. This results in a
significant amount of rewiring during application startup, as bundles are
started and services appear. A similar slowdown occurs during shutdown,
when services are being unregistered.

To address this, I implemented a debouncing mechanism that collects
services and registers them all at once after a configurable period of
stability. With this change, my application’s startup time improved by
roughly 30%.

If this optimization is of interest to the community, I’d be happy to share
my work and create a pull request. I tried to open one already, but it
seems I don’t have permission to push to the GitHub repository.

Thanks in advance for your feedback.

Best regards,
Nicolas Brasey

Reply via email to