|
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.
|