| 01-09-2004, 04:56 AM | #1 |
Is it possible that the xxxMakeTemporary functions could be the source of desyncs and lag during a game? It might be i'm implementing them poorly, but it does seem the case that the functions are causing some a bit of lag as my map was not suffering from these problems to the extent it is now. I've implemented the functions in WE and they are called via Temporary <Thing>(<Group>), and sometimes the functions are nested, could this be the source? |
| 01-09-2004, 05:07 AM | #2 |
Maybe if you're using them a shitload, but Battledome uses them without a hitch. What triggers that run the most do you have them in? What kind of lag are you seeing? |
| 01-09-2004, 05:48 AM | #3 |
The make temporary functions are used in any place where a group, point, or force is being called and not stored into a variable somewhere. And with around 700kb of code, that's a lot of places. Ultra said that a periodic was lagging that used a temp unit group, but not without. We're getting server splits, pauses, and just general lag. The selection system, unit spawns, and spells seem to be the source of that, and that basically covers the majority of the map. |
| 01-10-2004, 07:03 PM | #4 |
Ok it definately seems that the overuse of the functions will cause some lag/desyncs. I tested this via TBC with the functions, and TBC without. It actually might be that the functions cause the map to become more processor heavy and less ram heavy, because one with a processor slower than mine complained of lag, while a person with processors faster than mine did not. |
| 01-10-2004, 08:17 PM | #5 |
Well the make temporary functions ussually run with loops and make calls (more processer intensive). They do clear themselves of ram, eventually making them better ram wise. |
| 01-11-2004, 12:15 AM | #6 |
What is a temporary function? emote_confused |
| 01-11-2004, 12:21 AM | #7 |
On the jass vault we have certain functions that make variable types temporary. They use the BJ global vars and delete them as soon as they are done. heres an example: http://kattana.users.whitehat.dk/viewfunc.php?id=55 |
| 01-11-2004, 02:05 AM | #8 |
You mean that you temporarily use variables and then replace the previous content when you are done? What has this to do with temporary functions? emote_confused |
| 01-11-2004, 05:28 AM | #9 |
The functions are called xxxMakeTemporary because they remove things that would normally cause a memory leak, thus making them only in the memory temporarily :) Yeah I'd still suggest using them, unless you have as many triggers as TBC does. |
