View Single Post
Old Oct 26th, 2005, 4:25 PM   #1
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Optimising Memory Usage

Hi,
I've been unable to work out whether declaring a local object variable as static within a frequently called function produces any performance advantage like in C by virtue of the fact the object memory space is not continually destroyed/reallocated - i've discovered in practice that declaring a MySQL query resource handle variable as static, but standard class instances and arrays as globals decreases the code execution time significantly - could someone explain this to me please, and also give any general further speed tips: I'm working on various batch database processing scripts, and am currently falling foul of timeouts.
Thanks.
Rory is offline   Reply With Quote