Hello,

 

I have a CFC which does some string parsing to find and replace wildcards.
Within the CFC I am calling a method over and over and passing in the entire
string as an argument. The method does some magic and returns a result. 

 

The string could be a large (like a 2 page document) string and since its
being provided as an argument and is not inside an object/struct, I believe
its passed by value. Which means, unless I am mistaken, if I call the
internal method 100 times, and pass in this large string am I creating a ton
of overhead/memory usage? 

 

Would I be better off creating a temp structure to hold the string and other
arguments (which change with each iteration) and passing that into my method
so its passed by reference instead?

 

What do you think?

 

Brook D.

 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342758
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to