RFR: patch to reduce use of many temporary objects in java.util.UUID

Alan Bateman Alan.Bateman at oracle.com
Mon Nov 11 20:32:11 UTC 2013

On 07/11/2013 00:19, Robert Stupp wrote:
> Hi,
> the current implementation of java.util.UUID.fromName() and java.util.UUID.toString() unnecessarily produce a lot of temporary objects. Especially the fromName() method creates some instances of java.lang.Long and indirectly via "name.split()" many Strings, an ArrayList, etc. UUID.toString() creates at least 10 String objects plus the implicitly created char[] instances.
> Here's a hg diff which reduces the temporary object count while still providing the same functionality.
> -
> Robert
I see others have replied to point out the existing bug tracking this 
and also the patches that have been proposed in this area.

One other thing to mention is the "How to contribute" page [1] in case 
you haven't read it.


[1] http://openjdk.java.net/contribute/

More information about the core-libs-dev mailing list