[threeten-dev] #263 performance of getAvailableChronologies
roger riggs
roger.riggs at oracle.com
Sat Apr 27 11:45:48 PDT 2013
Hi,
Strictly speaking since if a thread doesn't see the value change from
false to
true (by another thread) it just pays the extra overhead of reloading
the data;
but the computation is identical.
I have changed it to use volatile. It will have a small performance
negative impact.
Thanks ,Roger
On 4/26/2013 7:39 PM, Stephen Colebourne wrote:
> Shouldn't the boolean init flag be volatile? Otherwise looks ok.
> Stephen
>
> On 26 April 2013 21:35, roger riggs <roger.riggs at oracle.com> wrote:
>> Please Review:
>>
>> A startup time concern [1] is the initialization of all of the
>> HijrahChronologies
>> whether they are used by an application or not. This change delays
>> reading the HijrahChronology specific data until the first time it is
>> needed.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~rriggs/webrev-chrono-init-263/
>>
>> Roger
>>
>> [1] https://github.com/ThreeTen/threeten/issues/263
More information about the threeten-dev
mailing list