We are in the process of upgrading a system from Coldbox 3.8 to 4.2. With all the changes in the framework, there are a lot of modifications we are making, but it is actually going very well, with one SIGNIFICANT exception.
We have a REST search service resource that performed very well under 3.8. However, under 4.2 (without any code changes), performance has gone from 1 second to 4 seconds to complete. We have added some metrics (elapsed time via getTickCount() via LogBox messages) and it appears the performance hit is localized to the renderData method (rendering JSON).
By way of a brief explanation, following is the process utilized by the reporting system:
· System determines the report types that need to be returned and the maximum number of total reports (there are numerous types of reports)
· Threads are spawned for each type of report. Each thread returns a collection of reports that matched the criteria as a struct-array
· Threads are joined and the records are aggregated (combined) the sorted into date descending order
· Results are returned using the renderData() as JSON to the client system
Each thread is completing in sub-second. The sorting process is averaging about 500ms (for 1,000 reports). All told the time in system is about 1500ms. However, the response is taking almost 5000ms, with Coldbox 4.2, to be returned to the client. Under 3.8, this process was taking about 2500ms. If we add more report types, the end-to-end is taking 20,000ms (or longer) versus 7,000ms under 3.8!
System is running on Windows Server 2012, with Adobe CF 11 (Updater 9) using SQL Server 2008 R2.
Any ideas? I can provide additional information, if desired.