Script Profiler
All games (beta build), CS2 ยท Settings. An on-screen panel that shows how much time per second each script takes and helps find what lowers your FPS.
Also searched as: profiler, script profiler, script lowers fps, script eats fps, lag, fps drop, low fps, which script is slow, script load, performance, ms/s
Where to find it in the menuโ
Settings โ Script Profiler
The page is available:
- in the beta build of the client โ in all games (the common menu profiler, described first);
- in CS2 โ in the regular build, with its own set of settings (see the "CS2" section below).
In the regular build of Dota 2 and Deadlock this page does not exist.
How to enableโ
- Menu (
Insert) โ Settings โ Script Profiler. - Turn on State. Off by default.
- A panel with a table appears on screen. The common profiler panel can be dragged by its header while the menu is open. The CS2 panel stays in place.
What it doesโ
Common profiler (beta build)
- Measures the time spent by script event handlers and updates the table once every Window seconds.
- Columns: MS/S โ how many milliseconds per second the row takes, AVG โ the average time of one call, MAX โ the longest call in the window, CALLS/S โ how many times per second it is called.
- The header shows the total script execution time.
- Group by file: on โ one row per script (the sum of all its handlers); off โ a separate row for each handler.
- With grouping by file and the menu open, clicking a row opens the details of that script: handlers and lines of code. โน ALL SOURCES returns to the overall list.
- A long window gives smoother numbers and catches rare spikes; a short one reacts faster, but the numbers jump.
CS2 (regular build)
- The panel is in the top left corner of the screen and updates once per second. The header shows the total script time in ms/s.
- Rows are colored by load: red โ at or above the "Red above" threshold, yellow โ from a quarter of the threshold, green โ below that.
Settingsโ
Common profiler (beta build)
| Setting | Type | Default | Range / options | What it does |
|---|---|---|---|---|
| State | Toggle | Off | โ | Turns on measurements and the panel |
| Group by file | Toggle | On | โ | On โ sum per script, off โ per handler |
| Sort by | Dropdown | ms / sec | ms / sec, avg ms, max ms, calls / sec | Row order: total time, average per call, worst spike, call frequency |
| Window | Slider, s | 1 | 1โ10 | Length of the measurement window |
| Max rows | Slider | 15 | 5โ40 | How many rows the panel shows |
| Reset | Button | โ | โ | Erase the collected statistics and start over |
CS2
| Setting | Type | Default | Range / options | What it does |
|---|---|---|---|---|
| State | Header toggle of the page | Off | โ | Turns on measurements and the panel |
| Group by file | Toggle | On | โ | On โ sum per script, off โ per handler |
| Sort by | Dropdown | ms / frame | ms / frame, ms / sec, calls / sec | ms / frame โ by average call time, ms / sec โ by total time, calls / sec โ by frequency |
| Max rows | Slider | 15 | 5โ40 | How many rows the panel shows |
| Red above | Slider, ms/s | 2 | 0.1โ10 | Rows more expensive than this value are drawn in red |
| Header color | Color | White | โ | Color of the panel header |
| Reset | Button | โ | โ | Erase the collected statistics |
FAQโ
There is no "Script Profiler" page. It does not exist in the regular build of Dota 2 and Deadlock: the common profiler is only in the beta build of the client. In CS2 the page is always there.
Which script is slowing down the game? Turn on the profiler, sort by ms / sec and look at the top rows. Turn off the suspicious script and compare FPS in the Watermark.
The numbers keep jumping. Increase the Window (beta build): the measurement becomes longer and the numbers smoother.