You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by "J. Brebec" <je...@gmail.com> on 2021/03/01 17:22:47 UTC

Parsing a script is really slow in OSGI

Hello,

I use Groovy (v3.0.7) in an OSGI container (Karaf with Equinox), and the parsing of a Groovy scripts takes seconds (7, 8s). In my unit test, the same script loads in ms.

If a script uses a property "a", or the map operator "a.b", then a lot of classes are tried to be resolved (like groovy.lang.Script$a, class b in package a, and resources groovy.lang.Script$a.groovy, ...). Due to Dynamic-ImportPackage or Buddy-Policy, the lookup are delegated to almost all my bundle.

Does anyone has the same issue, or a workaround ?

Regards,
Jérémie