I was noticing in doing my performance testing on a site using a debugging template that I was getting really slow performance on a page that does nothing but set default variables.
So I have a test page I setup and am seeing something really strange.
I have an include file that has 247 default variables for a site. That include takes about 50ms-70ms which seems really high to me. So I moved the values to a page instead of the include and wrapped them in a cftimer and the results remained the exact same.
I did a test and if I just do a
<cfset _site.blah = "">
I get the bad performance
doing a find and replace and change _site to variables._site
<cfset variables._site.blah = "">
and all the performance issues go away.
What my question is HOW IS THIS POSSIBLE? If the default for un-scoped variables is the variables scope how can they perform different? I am not accessing the variables so scope cascading does not come in to play here.