Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Eric Esquivel / Eric Esquivel (Eric Esquivel)
Created: 09/19/2016
Components: Performance
Versions: 2016,11.0
Failure Type: Performance Issue
Found In Build/Fixed In Build: CF11_Final / 307670
Priority/Frequency: Normal / Few users will encounter
Locale/System: ALL / Win 2008 Server R2 64 bit
Vote Count: 0
Problem Description:
Using String Underlying Java Method for String impact the performance of web page processing if they are used. With the "native" method (function) it has much better performances.
Steps to Reproduce:
<cfset myString= "test">
<cftimer label="toUpperCase">
<cfloop from="1" to="10000" index="i">
<cfset myString.toUpperCase()>
</cfloop>
</cftimer>
<cftimer label="uCase">
<cfloop from="1" to="10000" index="i">
<cfset uCase(myString)>
</cfloop>
</cftimer>
<cftimer label="reReplace">
<cfloop from="1" to="10000" index="i">
<cfset reReplace(myString,"\\([^\\]+)$","","all") />
</cfloop>
</cftimer>
<cftimer label="replaceAll">
<cfloop from="1" to="10000" index="i">
<cfset myString.replaceAll("\\([^\\]+)$","") />
</cfloop>
</cftimer>
Actual Result:
[2520ms] toUpperCase
[4ms] uCase
Expected Result:
similar speed to process the same operation
Any Workarounds:
Use the "native" method
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4190744
External Customer Info:
External Company:
External Customer Name: Eric Esquivel
External Customer Email:
External Test Config: My Hardware and Environment details:
Coldfusion 11, similar issue with CF2016
Attachments:
Comments: