Hi Vincente!

There is a bit code before that block which already checks the cache:
Boolean result = packageVetoCache.get(previousPackage);
if (result != null && result)
{
    return result;
}

Imo it should also return if a False is cached.
can you please remove the && result and do a bench again?

txs and LieGrue,
strub



> Am 27.07.2020 um 10:00 schrieb Vicente Rossello <[email protected]>:
> 
> Hi,
> 
> I've seen a startup performance regression since OWB 2.0.17 and latest 
> snapshot. Our boot times have increased from 10 to about 14 seconds (only OWB 
> side). I can see that it always try to load the same package-info's in:
> 
> while (true)
> {
>     try // not always existing but enables to go further when getPackage is 
> not available (graal)
>     {
>         pckge = classLoader.loadClass(previousPackage +
>                 (previousPackage.isEmpty() ? "" :".") + 
> "package-info").getPackage();
>         break;
>     }
>     catch (Exception e)
>     {
>         if (previousPackage.isEmpty())
>         {
>             pckge = null;
>             break;
>         }
>         packageVetoCache.put(previousPackage, false);
>         idx = previousPackage.lastIndexOf('.');
>         if (idx > 0)
>         {
>             previousPackage = previousPackage.substring(0, idx);
>         }
>         else
>         {
>             previousPackage = "";
>         }
>     }
> }
> 
> I think that, in this loop, it should take into account the packageVetoCache 
> (whether it's true or false). Is it correct? Do you want a PR with this 
> correction?
> 
> Best regards,
> Vicente.

Reply via email to