Re: RFR: 8215159: Improve initial setup of system Properties

2018-12-11 Thread Claes Redestad
Hi, On 2018-12-11 19:08, Roger Riggs wrote: Hi Claes, SystemProps.java:   - the import of Collections isn't used. will fix before push. VM.java:  - line 180:  The savedProps doesn't need to be (and was not previously) unmodifiable.    Seems safer this way though since the map at the bo

Re: RFR: 8215159: Improve initial setup of system Properties

2018-12-11 Thread Mandy Chung
On 12/11/18 10:08 AM, Roger Riggs wrote: VM.java:  - line 180:  The savedProps doesn't need to be (and was not previously) unmodifiable.    Seems safer this way though since the map at the bottom is not ConcurrentHashMap.    Its not entirely clear who calls getSavedProperties().    Would i

Re: RFR: 8215159: Improve initial setup of system Properties

2018-12-11 Thread Roger Riggs
Hi Claes, SystemProps.java:   - the import of Collections isn't used. VM.java:  - line 180:  The savedProps doesn't need to be (and was not previously) unmodifiable.    Seems safer this way though since the map at the bottom is not ConcurrentHashMap.    Its not entirely clear who calls getSav

Re: RFR: 8215159: Improve initial setup of system Properties

2018-12-11 Thread Claes Redestad
On 2018-12-11 18:41, Mandy Chung wrote: On 12/10/18 1:17 PM, Claes Redestad wrote: Hi, by inverting the order in which the internal property maps are created, we avoid some classloading and get a slightly more efficient code execution profile in System.initPhase1. Webrev: http://cr.openjd

Re: RFR: 8215159: Improve initial setup of system Properties

2018-12-11 Thread Mandy Chung
On 12/10/18 1:17 PM, Claes Redestad wrote: Hi, by inverting the order in which the internal property maps are created, we avoid some classloading and get a slightly more efficient code execution profile in System.initPhase1. Webrev: http://cr.openjdk.java.net/~redestad/8215159/jdk.00/ Bug: h

Re: RFR: 8215159: Improve initial setup of system Properties

2018-12-11 Thread Martin Buchholz
HashMap sizing was a terrible design mistake, but too much software depends on it, e.g. https://google.github.io/guava/releases/23.0/api/docs/com/google/common/collect/Maps.html#newHashMapWithExpectedSize-int- On Tue, Dec 11, 2018 at 1:26 AM Claes Redestad wrote: > Hi Peter, > > On 2018-12-11 10

Re: RFR: 8215159: Improve initial setup of system Properties

2018-12-11 Thread Claes Redestad
Hi Peter, On 2018-12-11 10:02, Peter Levart wrote: Hi Claes, Haven't checked all changes yet, although it looks like a straightforward swap of Properties for HashMap for intermediary result, but I noticed the following in SystemProps:  265 var cmdProps = new HashMapString>((vmP

Re: RFR: 8215159: Improve initial setup of system Properties

2018-12-11 Thread Peter Levart
Hi Claes, Haven't checked all changes yet, although it looks like a straightforward swap of Properties for HashMap for intermediary result, but I noticed the following in SystemProps:  265 var cmdProps = new HashMapString>((vmProps.length / 2) + Raw.FIXED_LENGTH); The HashMap(in

RFR: 8215159: Improve initial setup of system Properties

2018-12-10 Thread Claes Redestad
Hi, by inverting the order in which the internal property maps are created, we avoid some classloading and get a slightly more efficient code execution profile in System.initPhase1. Webrev: http://cr.openjdk.java.net/~redestad/8215159/jdk.00/ Bug: https://bugs.openjdk.java.net/browse/JDK-8215159