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 CASE | CF7 | CF8 |
| ------------------------------------------------------ | ||
| testEqualsMethodCallValid | 2140ms | 1156ms |
| testEqualsArgsFailStructCount | 1203ms | 625ms |
| testEqualsArgsFailComponent | 1218ms | 625ms |
| testEqualsArgsFailSimple | 1172ms | 641ms |
| testEqualsArgsFailQueryColumnlist | 1188ms | 609ms |
| testEqualsMethodCallInvalid | 1469ms | 890ms |
| testEqualsArgsFailArgCount | 1265ms | 625ms |
| testEqualsArgsFailQueryRecordCount | 1203ms | 610ms |
| testEqualsArgsFailStructKey | 1219ms | 625ms |
| testEqualsArgsValid | 1907ms | 609ms |

There are no comments for this entry.
[Add Comment]