Hey all, I am doing some performance tuning on a C...
# box-products
a
Hey all, I am doing some performance tuning on a ColdBox app and using FusionReactor to view execution times around specific requests. I have the coldbox config set to cache handlers, events, and views. I have requests where coldbox.system.web.controller.cfc is running very long.
Why would the controller need to process for 2 whole additional seconds?
cfUserContributionGateway2ecfc2003630689$funcREADUSERCONTRIBUTIONS.runFunction(/app/models/userContribution/UserContributionGateway.cfc:82)
cfUserContributionViewService2ecfc94352885$funcGETALLUSERCONTRIBUTIONS.runFunction(/app/models/userContribution/UserContributionViewService.cfc:160)
cfUserContributionViewService2ecfc94352885$funcGETUSERCONTRIBUTIONS.runFunction(/app/models/userContribution/UserContributionViewService.cfc:145)
cfUserContribution2ecfc339579980$funcREADUSERCONTRIBUTIONS.runFunction(/app/modules_app/api/modules_app/v1/handlers/UserContribution.cfc:24)
cfRestHandler2ecfc1482150499$funcAROUNDHANDLER.runFunction(/app/coldbox/system/RestHandler.cfc:58)
cfController2ecfc102072789$func_RUNEVENT.runFunction(/app/coldbox/system/web/Controller.cfc:940)
cfController2ecfc102072789$funcRUNEVENT.runFunction(/app/coldbox/system/web/Controller.cfc:658)
cfBootstrap2ecfc167010443$funcPROCESSCOLDBOXREQUEST.runFunction(/app/coldbox/system/Bootstrap.cfc:290)
cfBootstrap2ecfc167010443$funcONREQUESTSTART.runFunction(/app/coldbox/system/Bootstrap.cfc:507)
cfApplication2ecfc1572209739$funcONREQUESTSTART.runFunction(/app/Application.cfc:56)
The model layer takes about 400ms but the handler processing taking 2,500ms...
What does app/coldbox/system/web/Controller.cfc do with the request that would cause it to take so long?
b
@aaronstoddard Are you using the Profiler feature?
I'm not sure what your partial stack trace is from above, but it doesn't seem to show much other than a
UserContributionGateway.READUSERCONTRIBUTION()
method being run
The FR profiler feature will give you a percentage breakdown of all the bits of your page and which part took how much time

https://www.youtube.com/watch?v=kr9MmMlpPnQ

j
@aaronstoddard
coldbox.system.web.Controller
wraps the entire request so that time would be everything inside of the request - interceptors, handlers, etc. Your stack trace shows it entering your model layer, but there may be other things occurring. It’s hard to know what would be slowing things down without more specifics.
a
Thanks for the pointer to that video. That will help me dig in deeper. I'm sure its some code somewhere in the request,
👍 1