Re: Review Request: JDK-8193159: Reduce the number of classes loaded due to NativeLibrary

2017-12-07 Thread Martin Buchholz
+1

Re: Review Request: JDK-8193159: Reduce the number of classes loaded due to NativeLibrary

2017-12-07 Thread mandy chung
On 12/7/17 5:39 AM, Alan Bateman wrote: On 07/12/2017 05:04, mandy chung wrote: On 12/6/17 6:08 PM, Martin Buchholz wrote: Google decided that LinkedList is almost never the best choice, so any use of LinkedList is discouraged. ArrayDeque's backing array never shrinks, so you might want

Re: Review Request: JDK-8193159: Reduce the number of classes loaded due to NativeLibrary

2017-12-07 Thread Claes Redestad
On 2017-12-07 14:39, Alan Bateman wrote: On 07/12/2017 05:04, mandy chung wrote: On 12/6/17 6:08 PM, Martin Buchholz wrote: Google decided that LinkedList is almost never the best choice, so any use of LinkedList is discouraged. ArrayDeque's backing array never shrinks, so you might wan

Re: Review Request: JDK-8193159: Reduce the number of classes loaded due to NativeLibrary

2017-12-07 Thread Alan Bateman
On 07/12/2017 05:04, mandy chung wrote: On 12/6/17 6:08 PM, Martin Buchholz wrote: Google decided that LinkedList is almost never the best choice, so any use of LinkedList is discouraged. ArrayDeque's backing array never shrinks, so you might want to give it an explicit initial size.

Re: Review Request: JDK-8193159: Reduce the number of classes loaded due to NativeLibrary

2017-12-06 Thread mandy chung
On 12/6/17 6:08 PM, Martin Buchholz wrote: Google decided that LinkedList is almost never the best choice, so any use of LinkedList is discouraged. ArrayDeque's backing array never shrinks, so you might want to give it an explicit initial size. The initial size is 16 which is okay.  I ca

Re: Review Request: JDK-8193159: Reduce the number of classes loaded due to NativeLibrary

2017-12-06 Thread Martin Buchholz
Google decided that LinkedList is almost never the best choice, so any use of LinkedList is discouraged. ArrayDeque's backing array never shrinks, so you might want to give it an explicit initial size. On Wed, Dec 6, 2017 at 4:33 PM, mandy chung wrote: > A tiny startup fix - useArrayDeque inste

Review Request: JDK-8193159: Reduce the number of classes loaded due to NativeLibrary

2017-12-06 Thread mandy chung
A tiny startup fix - useArrayDeque instead of LinkedList for ClassLoader.NativeLibrary which is typically loaded at startup for example when loading a JAR file. Thanks Mandy diff --git a/src/java.base/share/classes/java/lang/ClassLoader.java b/src/java.base/share/classes/java/lang/ClassLoader