Coldfusion createUUID() function is slow. I find using the underlying JAVA class UUID in the java.util package is much faster. Here’s how we do it in coldfusion -
<cfset myUUID = createobject(“java”, “java.util.UUID”) .randomUUID().toString()/>
The createObject function allows us to access the underlying JAVA functions, so we access the java.util.UUID class and then create the UUID using the randomUUID() function and finally converting to string using toString() function. If you will be creating UUID more than once on the page i would recommend creating the object once at the top if the page and then using the functions to create the UUID.
Just another example of the using the awesome power of JAVA in coldfusion.