Anybody else experience major slowdowns when switc...
# box-products
j
Anybody else experience major slowdowns when switching to ColdBox? I sunk a lot of time converting most of my site the past few weeks but my server requests are taking at minimum 10x longer to resolve than before. I went ahead and got a FusionReactor license to do some profiling and can definitely see that a lot more is going on with ColdBox than vanilla CFML. See comments for some profiling screenshots. Both running on the latest Lucee Docker container
Before:
After ColdBox:
Anybody notice anything out of the ordinary here? This is out of my wheelhouse but working on building an understanding of this whole profiling system
My handler on this page is quite simple. But every page is experiencing the inflated load times, so don't think this is anything specific to this template/handler.
s
Two seconds for a largely empty Coldbox event is definitely not right
Are you reinitializing the framework on every request? Sometimes this is a setting that gets turned on for development
I think it's
wirebox.singletonreload
or something like that
j
I can't seem to find that setting anywhere. My
Coldbox.cfc
wasn't changed too much, here it is:
Here's the wirebox settings:
s
which version of Lucee and Coldbox?
nothing there jumps out
j
Lucee 5.3 and it looks like ColdBox 6.24
s
I'd update to the current production release of Coldbox which is 6.7 or 6.8 just to eliminate that as a culprit
j
Ah I was looking in the wrong spot, I am on
6.8.1+5
but good call to check that
a
set
handlersIndexAutoReload
to false. That is causing the handler to be reloaded on every request. Handy for development but not production.
I think that's the bottleneck
s
oh wow, yeah, can't believe I missed that one
2 seconds is still a lot to load an empty handler
but if you have a lot of them
a
Yeah.
These are the Coldbox defaults:
Copy code
"handlersIndexAutoReload" : false,
"handlerCaching" : true,
"eventCaching" : true,
"viewCaching" : true,
j
That seemed to be the culprit. Y'all have my everlasting gratitude 🙏
Initial page loads are taking around 2 seconds for most templates, but once everything is cached everything is loading in about 0.5 seconds now. So much better
🏎️ 1
a
Great! 🙂 Glad you found it.
You can probably set
handlerCaching
to true as well and see if that helps. I'd leave
eventCaching
and
viewCaching
set to false as depending on your application you may not want them cached..
j
Good call! I will experiment.
s
Event caching only does anything if you explicitly enable it in your events, though
👍 1