![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
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. |
|
|
|
|
|
#2 |
|
Professional Programmer
|
If you're timing out, I doubt it's because your query variables are taking too much memory out of the server. If you wanted to re-set them though, you could always set $var = null; or something like that.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|