Poor performance with CB 4.2

35 views
Skip to first unread message

Kevin Anderson

unread,
Jul 14, 2016, 8:30:21 PM7/14/16
to col...@googlegroups.com

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.

 



Kevin S. Anderson

CIDNE/INDURE Mobile - Software Engineer

Intelligent Software Solutions Inc.

Analysis and Information Management Solutions

Phone: 719.452.7456 | Cell: 719.930.2599 

 

 

br...@bradwood.com

unread,
Jul 15, 2016, 12:39:24 AM7/15/16
to col...@googlegroups.com
Could the change be related to switching from the old JSON plugin in earlier versions of Coldbox to the native serializeJSON() function?  Can you create stand alone test case for us to try?  How big is the JSON document coming back?  Also, what does Fusion Reactor say the threads are doing during this time if you look at the stack trace?

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
Subject: [coldbox:25815] Poor performance with CB 4.2
From: "Kevin Anderson" <kevin.a...@issinc.com>
Date: 7/14/16 7:30 pm
To: "col...@googlegroups.com" <col...@googlegroups.com>

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:

 

<![if !supportLists]>·         <![endif]>System determines the report types that need to be returned and the maximum number of total reports (there are numerous types of reports)

<![if !supportLists]>·         <![endif]>Threads are spawned for each type of report. Each thread returns a collection of reports that matched the criteria as a struct-array

<![if !supportLists]>·         <![endif]>Threads are joined and the records are aggregated (combined) the sorted into date descending order

<![if !supportLists]>·         <![endif]>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.

 



Kevin S. Anderson

CIDNE/INDURE Mobile - Software Engineer

Intelligent Software Solutions Inc.

Analysis and Information Management Solutions

Phone: 719.452.7456 | Cell: 719.930.2599 

 

 

 

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/B7C7DD65-7E0E-4C32-93D3-E23D80EB2FB3%40issinc.com.
For more options, visit https://groups.google.com/d/optout.

Luis Majano

unread,
Jul 15, 2016, 6:22:10 PM7/15/16
to coldbox
Everything that Brad said. We need more metrics into what is causing those issues.  FusionReactor would be the best choice.

Don Q

unread,
Jul 15, 2016, 8:29:07 PM7/15/16
to ColdBox Platform
Anecdotal but I've seen the same issue in the past.  For certain things I've taken the old JSON plugin and converted it to a module to use because of the horrible serializeJSON() performance. (On certain things)

Kevin Anderson

unread,
Jul 18, 2016, 10:43:40 AM7/18/16
to col...@googlegroups.com

Performance issue has been solved by changing server configuration. Developer had turned off caching in CF Admin in order to diagnose another problem. Once the caching was turned back on, performance degradation disappeared. Performance is now, with 4.2, similar to 3.8.

 

All is well!

Reply all
Reply to author
Forward
0 new messages