RFR 8012190: Global scope should be initialized lazily
Marcus Lagergren
marcus.lagergren at oracle.com
Wed Mar 25 16:49:53 UTC 2015
+1
> On 25 Mar 2015, at 10:05, A. Sundararajan <sundararajan.athijegannathan at oracle.com> wrote:
>
> Made Math as eagerly initialized property again. Uploaded updated webrev for reference here:
> http://cr.openjdk.java.net/~sundar/8012190/webrev.01/
>
> thanks for the review,
> -Sundar
>
> On Wednesday 25 March 2015 01:50 PM, Hannes Wallnoefer wrote:
>> +1, nice.
>>
>> Maybe leave Math eagerly initialized as it is often used in hot numeric code?
>>
>> Hannes
>>
>> Am 2015-03-25 um 07:21 schrieb A. Sundararajan:
>>> Please review http://cr.openjdk.java.net/~sundar/8012190/webrev.00/ for https://bugs.openjdk.java.net/browse/JDK-8012190
>>>
>>> Except for mostly used/needed objects such as Object, Function, Number etc. other constructors, objects are lazily initialized via @Getter (Math, RegExp, Date, Java, JavaImporter, EvalError, URIError, typed array constructors).
>>>
>>> ~200 classes are not loaded at startup when jjs is started in interactive mode. Should help in startup - both interactive mode and in scenarios when many globals are created and thrown away after simple code evaluation.
>>>
>>> Thanks,
>>> -Sundar
>>
>
More information about the nashorn-dev
mailing list