Performance Enhancements

The reflect package which CFEasyMock relies on to actually create the proxy has been updated to support the CF8 feature of onMissingMethod.

Nothing in the easymock package has changed. However, I will be updating the online zip and the SVN repository with the CF8 version of the Proxy component.

You will probably see a new project come up in a few days that will contain the reflect package itself. This is the package that does all the heavy lifting to create the proxy components and there are some cool ideas I'd like to implement, and these things aren't directly tied to the easymock package.

It will also allow me to version them seperately.

The primary benefit of moving to CF8 and onMissingMethod is speed. The CF7 version of reflect has to write a dummy component with the correct function call, create that file as a component instance, and then inject the function into the proxy. This can take considerable time if you have many mock objects.

Below are some times from unit tests for the ExpectedMethodCall, one of the biggest test cases in the package:

TEST CASECF7CF8
------------------------------------------------------
testEqualsMethodCallValid2140ms1156ms
testEqualsArgsFailStructCount1203ms625ms
testEqualsArgsFailComponent1218ms625ms
testEqualsArgsFailSimple1172ms641ms
testEqualsArgsFailQueryColumnlist1188ms609ms
testEqualsMethodCallInvalid1469ms890ms
testEqualsArgsFailArgCount1265ms625ms
testEqualsArgsFailQueryRecordCount1203ms610ms
testEqualsArgsFailStructKey1219ms625ms
testEqualsArgsValid1907ms609ms

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.5.006. | Protected by Akismet | Blog with WordPress