Re: ReflectionData space optimization in java.lang.Class (JEP-149)

2012-12-17 Thread Peter Levart
Hi David, Fair enough. So only the basic ReflectionData patch for now. Here I prepared yet another revision that only contains the basic stuff from 1st revision of the patch but fixes long lines, splits the reflectionData method in two and also fixes an inconsistency - in one method there was

Re: ReflectionData space optimization in java.lang.Class (JEP-149)

2012-12-16 Thread David Holmes
Hi Peter, We have to be careful not to disrupt the dynamics of things too much. Duplicate copies wastes memory but doing the replacement wastes time. If we could be purely memory focused then we would do anything to save memory, but we can't do that - we're trying to save some memory without

Re: ReflectionData space optimization in java.lang.Class (JEP-149)

2012-12-16 Thread Peter Levart
Hi David, Mandy, Joel and others, I prepared the 3rd revision of the patch: http://dl.dropbox.com/u/101777488/jdk8-tl/JEP-149.c/webrev.03/index.html Changes from the 1st revision (disregard 2nd revision) are as follows: - The split of reflectionData() method into short fast-path and longer sl

Re: ReflectionData space optimization in java.lang.Class (JEP-149)

2012-12-13 Thread David Holmes
Hi Peter, On 13/12/2012 10:27 PM, Peter Levart wrote: On 12/13/2012 11:46 AM, David Holmes wrote: I also found code-paths that evaluated reflectionData() method more than once for each external call. It's the methods: private Field[] privateGetDeclaredFields(boolean publicOnly) and priva

Re: ReflectionData space optimization in java.lang.Class (JEP-149)

2012-12-13 Thread Peter Levart
On 12/13/2012 11:46 AM, David Holmes wrote: Hi Peter, I dropped Joel from the direct cc as this isn't annotation related. On 13/12/2012 8:13 PM, Peter Levart wrote: Hi Mandy, David and others, Here's the updated version of the patch for ReflectionData: http://dl.dropbox.com/u/101777488/jdk8-

Re: ReflectionData space optimization in java.lang.Class (JEP-149)

2012-12-13 Thread David Holmes
Hi Peter, I dropped Joel from the direct cc as this isn't annotation related. On 13/12/2012 8:13 PM, Peter Levart wrote: Hi Mandy, David and others, Here's the updated version of the patch for ReflectionData: http://dl.dropbox.com/u/101777488/jdk8-tl/JEP-149.c/webrev.02/index.html I split lo

ReflectionData space optimization in java.lang.Class (JEP-149)

2012-12-13 Thread Peter Levart
Hi Mandy, David and others, Here's the updated version of the patch for ReflectionData: http://dl.dropbox.com/u/101777488/jdk8-tl/JEP-149.c/webrev.02/index.html I split long lines as proposed by Mandy. I also split reflectionData() method in two methods, so the fast-path method is smaller and