Improve Model-Glue 3 Load Time: Remove Unwanted Helpers
I've been spending a fair amount of time playing with the latest Release Candidate of Model-Glue 3 lately, and I've stumbled on a way to vastly improve load time.
One of the new features of MG3 is "helpers", which is an easy way to make UDFs available throughout your applications. It really does make working with UDFs in Model-Glue easier, but there's one problem: It comes packaged with hundreds and hundreds of them. In fact – almost every single UDF on CFLib! And especially on your development server, where you're likely to reload the entire framework on every request loading them takes a good long time.
If you prefer to hand-pick which UDFs to include – as I do – you have a couple of options. The simplest is to edit your config/coldspring.xml file, and remove the reference to the packaged helpers:
<property name="helperMappings"><value>/helpers,/ModelGlue/helpers</value></property>
becomes:
<property name="helperMappings"><value>/helpers</value></property>
Now you can selectively put UDFs that you want to use into your /helpers folder and have access to them without having to tack an extra 10 seconds onto the load of every page.
Posted in ColdFusion | Frameworks | Model-Glue