openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: OWB 2.0.17 startup performance regression
Date Mon, 27 Jul 2020 09:27:35 GMT
Should work as expected. I need to think through if we really need to walk into all superpackages
in the while(true).
Or if we should try to get those results from the cache as well.

a.b.c.d.e.f.x1
a.b.c.d.e.f.x2

In that case the whole list up to f should already be cached for x2.

LieGrue,
strub



> Am 27.07.2020 um 11:19 schrieb Vicente Rossello <cocorossello@gmail.com>:
> 
> Hi,
> 
> That's what already did and times become as usual, but I'm not sure if it breaks something
(I'm not using any veto). Tests in openwebbeans-impl do work with this change
> 
> On Mon, Jul 27, 2020 at 11:14 AM Mark Struberg <struberg@yahoo.de <mailto:struberg@yahoo.de>>
wrote:
> 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 <cocorossello@gmail.com <mailto:cocorossello@gmail.com>>:
>> 
>> 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.
> 


Mime
View raw message