The Profiler

The Debugger permits you to step through your code and find any issues with the code base, but sometimes you need to check for subtler details in order to properly optimise your games. The Profile option helps to do just that by giving you a performance overview, showing the time it takes to call functions, scripts, and even how long it took a specific event to complete.

Debug Profile WindowApart from the main window showing all the different events, scripts and functions being called, you also have the following options for using the Profiler:

Enable / DisableEnable / Disable

This is the button to enable or disable the Profiler. When enabled, the profiler will start and you will start to see events, scripts and functions be listed in the main window along with different data values for each of them. How this data is displayed will depend on the Time Display and the View Mode (both explained in more depth below).


Time DisplayTime Display

This checkbox permits you to switch between the average time and the absolute time for the profiler. When it is not checked, the values shown in the main window will be the total number of calls made to the function, script or event and the total time taken (times are in microseconds) over the course of the profile. However if you enable this then these columns show the average time taken per step for each function, script or event, and the average number of times that it was called.


View ModeView Mode

This menu lets you choose the view mode, which can be either Top Down or Bottom Up.

Selecting the Top Down view mode will show the profile from the top down (more or less the same as the callstack hierarchy) so it will show the event, then the script and then any functions used. Note that you can double click LMB Icon on any of the entries to have it open in the Source debug window if you have one. If you see a Expand Debug Icon icon beside a name then there are further script or function calls within that section, and clicking the Expand Debug Icon will expand the tree to show them.

Selecting the Bottom Up view mode will show things from the bottom up so you can see all the functions and script calls individually. When using this view mode, clicking on the Expand Debug Icon will expand the function or script to show what actually called it.


View TargetView Target

The View Target permits you to choose between viewing the project GML (event and code data), the background engine processes or both. If you choose "GML", then you will get the events, functions and scripts being called each step while the "Engine" view will only show the engine calls required by the project, enabling you to see any bottlenecks in the way that your project is handling things. If you select "Both", then both sets of data will be displayed, but note that when combined with the "Bottom Up" view, the different script and function calls will be nested within the engine calls and you will need to click the Expand Debug Icon to expand these out to see them.



The profile data is shown in four columns, and clicking on any of them will sort the data according to the column criteria.

Profile Display