Measure Efficiency of code in a map

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Is there any good way to tell how many computations per second are being used throughout a custom game?
Until HotS we won't really have any way of knowing where our bottlenecks are right?

For those of you who don't know, HotS will have a lot of editor upgrades. One being a list of all your (triggers/functions?) and the time it takes to execute each. The idea is that the editor can show you where the bottlenecks in your map are so that you can better spend your time fixing the areas of issue.

For now, though, I'm unaware of a way (other than raw size) of telling how many cps are being used or how much load is necessary.

Any insights would be appreciated. :)
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
The editor already has those features to some extent. If you test your maps with a trigger debug window you'll get features like: times it's been run, times it's failed a condition, average run time, average fail time, total time.

This means one bottleneck you can check for is just sort by total time and see what trigger has run for the highest amount of time.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
I was also wondering are arrays dynamic within the engine or is it all statically created? We don't really have the option of making a dynamic array, so when we declare an array of size whatever, it unfortunately creates a static one with the size given, right?

I am very curious about all of the restrictions in size and speed that the editor can handle. How it handles certain cases. etc.
 

Dave312

Censored for your safe viewing
Reaction score
269
Yes array's are static. However you could always use a Data Table as a dynamic array. The downside is that Data Tables are technically only 1 Dimensional (array's can be up to 4 dimensions) although you could probably alter the string identifiers to act like a 4D array.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
> although you could probably alter the string identifiers to act like a 4D array
Name[x][y][z][a][c][d]
as many arrays as you want and they dont take up any space in the script limit, data tables are prefered when saving information to be used between triggers
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top