Coldfusion 2016 vs Coldfusion 9 compile time
Hi,
We are in the process of upgrading from coldfusion 9 to 2016 and we see an overall decrease of performance for coldfusion 2016. As far as we read coldfusion 2016 should be faster then coldfusion 9but this is not the case. Below a test script that can be run to see the difference in performance:
<!--- Machine info --->
<cfset runtime = createObject("java", "java.lang.System")>
<cfset props = runtime.getProperties()>
<cfset env = runtime.getenv()>
<Cfoutput>
java.version: #props["java.version"]#<br>
java.vm.name: #props["java.vm.name"]#<br>
os.name: #props["os.name"]#<br>
PROCESSOR_IDENTIFIER: #env["PROCESSOR_IDENTIFIER"]#<br>
PROCESSOR_ARCHITECTURE: #env["PROCESSOR_ARCHITECTURE"]#<br>
NUMBER_OF_PROCESSORS: #env["NUMBER_OF_PROCESSORS"]#<br><Br>
</Cfoutput>
<!--- Create a query --->
<cfset myQuery = QueryNew("Name, Time, Advanced", "VarChar, Time, Bit")>
<cfset testQuery = QueryNew("ColumnA,ColumnB,ColumnC,ColumnD,ColumnE,ColumnF,ColumnG,ColumnH,ColumnI,ColumnJ,ColumnK,ColumnL,ColumnM,ColumnN","VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar,VarChar")>
<!--- Populate the query --->
<Cfloop from=1 to=10 index="x">
<cfset QueryAddRow(testQuery, 1)>
<cfloop index="intLetter" from="#Asc('A')#" to="#Asc('N')#" step="1">
<cfset temp = QuerySetCell(testQuery, "Column#chr(intLetter)#", "Row #x# column #intLetter#", x)>
</cfloop>
</cfloop>
<Cfset init = GetTickCount()>
<cfloop from=1 to=10 index="x">
<Cfset init2 = GetTickCount()>
<!--- Query to structure --->
<Cfset queryToStruct = structNEw()>
<cfloop query="testQuery">
<cfset queryToStruct[testQuery['ColumnA'][testQuery.currentrow]] = structNew()>
<cfloop list="#testQuery.columnList#" index="key">
<cfset queryToStruct[testQuery['ColumnA'][testQuery.currentrow]][testQuery[key][testQuery.currentrow]] = evaluate(key)>
</cfloop>
</cfloop>
<cfoutput>#x#:#GetTickCount()-init2#<br></cfoutput>
</cfloop>
<cfoutput>-----------<br><b>#GetTickCount()-init#</b><br><br><Br></cfoutput>
<Cfdump var=#queryToStruct#>
I ran this code on two machines with the exact same hardware specifications (same cpu / same ram). Both versions have the same Minimum JVM Heap Size (5024 MB) and Maximum JVM Heap Size (5048 MB). The performance on the coldfusion 9 server is by average 4x faster. My question is why? And is there anything i can do to improve the performance on the coldfusion 2016 machine. If necessary live exampes are available.
Update:
I wonderded if the windows server / IIS slowed things down on de coldfusion 2016 machine so i did some further testing. I installed the coldfusion 9 developer edition, coldfusion 11 developer edition and the coldfusion 2016 developer edition all with the build in webserver on the same VPS. Running the script above.the coldfusion 9 is fastest, coldfusion 11 seems slightly slower. Coldfusion 2016 is much slower then the older versions.
Message was edited by: Thijs
