Title:
Interfaces are slow, continuously checked if modified (implementedInterfacesChanged/getLastModifiedTime)
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): KlaasJan Winkel / KlaasJan Winkel (elklaaso)
Created: 09/20/2012
Components: Performance
Versions: 9.0.1
Failure Type: Performance Issue
Found In Build/Fixed In Build: 9.0.1 /
Priority/Frequency: Major / All users will encounter
Locale/System: English / Windows 7
Vote Count: 0
Problem Description:
At each function call, coldfusion checks if the interface is implemented correctly, it checks if the interfaces files have been modified. This cannot be turned off in the admin (no caching options help with this, disable cfc type check also does not help).
Steps to Reproduce:
Create a cfc, that implements (preferrably) multiple interfaces, with a function that does something like return 1+1 (it seems not to be checked if it doesnt do anything?!).
Loop over that function from another cfc many times.
Use VisualVM -> Monitor-> CPU sampling.
You will get many:
at java.io.WinNTFileSystem.getLastModifiedTime(Native Method)
Thread dump looks like this (see attached file):
java.lang.Thread.State: RUNNABLE
at java.io.WinNTFileSystem.getLastModifiedTime(Native Method)
at java.io.File.lastModified(File.java:826)
at coldfusion.compiler.NeoTranslator.getLastModifiedTime(NeoTranslator.java:990)
at coldfusion.runtime.TemplateClassLoader.getLastModifiedTime(TemplateClassLoader.java:297)
at coldfusion.runtime.InterfaceTemplateProxyCache.getTemplateProxyFromPath(InterfaceTemplateProxyCache.java:119)
at coldfusion.runtime.TemplateProxy.implementedInterfacesChanged(TemplateProxy.java:1472)
at coldfusion.runtime.TemplateProxy.verifyInterfacesImpl(TemplateProxy.java:862)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2297)
Actual Result:
Interface checked for changes continuously on file system.
Expected Result:
At least no interface change check within 1 request.
Any Workarounds:
It seems that this guy made a workaround using AspectJ:
http://forums.adobe.com/thread/1048647
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3334174
External Customer Info:
External Company:
External Customer Name: elklaaso
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
- September 20, 2012 00:00:00: 1_interfacecheckthreaddump.JPG
- September 20, 2012 00:00:00: 2_cpusample.JPG
- December 18, 2013 00:00:00: 3_lastmodifiedbugtestcase.zip
- December 18, 2013 00:00:00: 4_lastmodifiedbugtestcaseNEW.zip
Comments: