[coldbox-4]: How to investigate slow processes

I’m running a ColdBox app on Lucee 4.5.2. The app is relatively slow; and when I turned on ColdBox Debugger, the [preProcess to postProcess] was taking time.
I was wondering if I can drill down those processes. Does Coldbox have a tool to do that? Or, should I put CFTIMER on suspected code to narrow down the issue? If you have better techniques, I would like to know.

Thank you.

What kind of code do you have in those interceptors? I would pull some stack traces from Fusion Reactor while the site is running to see what parts are taking the most time.



ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I have two interceptors running:


function afterConfigurationLoad() {
var logBox = controller.getLogBox();


  1. To trim simple values


function onRequestCapture(event, interceptData, buffer) {
if (CGI.REQUEST_METHOD == “post”) {
for (LOCAL.current_field in rc) {
// Trim only simple value
if (isSimpleValue(rc[LOCAL.current_field])) {
// Trim all inputs
rc[LOCAL.current_field] = trim(rc[LOCAL.current_field]);



What I do is add my own timers - makes the whole thing a bit cleaner:

property name=“DebuggerService” inject=“provider:debuggerService@cbdebugger”;

function longRunningEventThing() {
var timerHash = DebuggerService.timerStart(“Start a timer…”);
// do some stuff that takes time

The result will spit out the time in your Coldbox Debugging output…