Slow app.bndrun launch when having full core source under eclipse,

  • Platform information:
    • Hardware: Ryzen 7 3700x, SDD Nvme, 16Go
    • OS: Windows 11
    • Java Runtime Environment: Java Zulu version 21
    • openHAB version: 5.x

Hello all,

I don’t undestand why openhab launch such slow when we have the openhab-core source inside eclipse.

More specifically, I don’t undestand what happens during the phase “Performing final launch validation …” when you launch the app.bndrun debug configuration.

As far as I can see, in this phase, all build are finished, and if I understand, the bndtools just have to verify that all jar in features.xml are present and valid, and then launch the karaf runtime.

The matter is that under full eclipse with core source, this phase take around 1m30 to 2mn on my computer.

When I have only the distro with a few addon in my eclipse, the phase only take 3s-5s !

Do someone know if there is a way to speedup this phase, this is very annoying when you restart the runtime many time to debug change.

Thanks,
Laurent.

I am not quite sure, but bnd launch is somewhat separate from karaf. It launches openHAB core based on runfile which lists all necessary bundles. While it may contain karaf bundles, it is completely different way to spin a thing.

Some of validation is simply making sure that all inner packages are resolved. However, under the hood, there is an abstract concept of requirements and capabilities which is checking a lot more. That part can take a lot of time, especially if you have complete runtime with all needed dependencies.
Have you observed any high resource utilisation when task in question is being performed?

About ressource, not really.
Cpu is underuse, around 20/25%.
Threads seems to run on all of the 16 core, but no overload.

Memory and SDD seems also ok. SDD is only at 15%.

I see that there is a lot of access on the .m2 folder.
So I try to move the .m2 folder to a ramdisk to see if it change, but same result :frowning:

Laurent.

I don’t know much about bndtools, but seems that the final launch validation is indeed a small task (at least in this code): bnd/org.bndtools.launch/src/bndtools/launch/AbstractOSGiLaunchDelegate.java at master · bndtools/bnd · GitHub.

Disk access is for sure happening, because modules and their metadata are being read. I am not sure if it is cached at Eclipse or Bnd level, since contents of your .m2 repository might be changed from outside of IDE thought i.e. command line call to mvn.

Hello,

thanks to have take a look.
I find finally another way to work.

I start from the light version with only distro and addons, and import the core bundles that I need to work on using a maven import.

It’s work very well like that, so don’t bother to much.

Laurent.