Do note that if you use the debug/performance tools that they add an execution overhead due to the instrumentation. Something may execute slowly in debug mode but not at all noticeable in normal mode as a result.
For that reason the above results I posted were for just plain old testing the map.
Prints out Siege Tank, Thor and Hellion as expected (I am using WoL dependencies for this test, would print out the rest with other dependencies I am sure since the code is entirely dynamic). It also does all this producing no errors at all as it only fetches unit entries that exist.
How long does it take to execute you ask? I cannot tell exactly but what I can tell you is that it is completely trivial as the game does not even drop a single frame! As this is 300 executions of catalog get calls one can deduce that the execution time of a single catalog get is well below 55.6 micro seconds (0.0000556 seconds). This means that catalog natives are as good as trivial to execute.
Your poor performance must be coming from two places.
The Galaxy Virtual Machine error caused by an invalid catalog get call. My examples produce no such errors.
Logging/producing the debug messages used. My examples kept these calls to a minimum.
If you need any help implementing a specific system I could possibly help.
The only way to figure out which units this ability produces is to go through the array and look at each entry. If I ask it which unit is in slot 4 (thor) that operation takes about 0.1 seconds. However if I ask it about a slot with no unit in it then it takes about 0.3 seconds.
Something looks wrong with those times... How did you measure them?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Do note that if you use the debug/performance tools that they add an execution overhead due to the instrumentation. Something may execute slowly in debug mode but not at all noticeable in normal mode as a result.
For that reason the above results I posted were for just plain old testing the map.
Tested the following.
Does not drop a single frame when executed and does correctly display "Thor".
However this is simple, lets try doing what you want but with correct validation.
Prints out Siege Tank, Thor and Hellion as expected (I am using WoL dependencies for this test, would print out the rest with other dependencies I am sure since the code is entirely dynamic). It also does all this producing no errors at all as it only fetches unit entries that exist.
How long does it take to execute you ask? I cannot tell exactly but what I can tell you is that it is completely trivial as the game does not even drop a single frame! As this is 300 executions of catalog get calls one can deduce that the execution time of a single catalog get is well below 55.6 micro seconds (0.0000556 seconds). This means that catalog natives are as good as trivial to execute.
Your poor performance must be coming from two places.
If you need any help implementing a specific system I could possibly help.
Something looks wrong with those times... How did you measure them?