Performance warning
Performance warnings, also called Probe warnings or Warning lights, will flash in the lefthand part of the viewport when things are happening which might negatively impact framerate. These warnings can help developers identify what might be causing FPS problems.
Performance warnings are often associated with Probes, which generate more elaborate warnings in the Console panel with additional information. This is not a one-to-one relationship with the "flashing" warning in the viewport, which will happen more frequently than console messages may be generated. However, the term "probe warning" may be used for either warning, in the viewport or in the console panel.
Contents |
Format
The format of a warning (in the viewport) is:
Name 20% 4ms
These numbers are dependent on the current framerate and frametime.
- Example #1
If the current framerate is 60 frames-per-second, then the frametime for each frame is 16 milliseconds (1000ms / 60frames). So if the scripting engine were taking 8 milliseconds to process whatever the probe was currently measuring, the error message would be "HeroScript exec 50% 8ms": 8 milliseconds to process, which was 50% of the current frametime of 16 milliseconds.
- Example #2
In the example of "20% 5ms", you could also work backwards:
If 5ms is 20% of frametime, then current frametime is 25ms. A frametime of 25ms means a framerate of 40 frames per second (1000 ms / 25 ms), at the time of the warning.
Information
The warnings are a tool, rather than an absolute indicator, since the exact threshold when these warnings appear may be somewhat arbitrary. So just because the warning is not activating, does not necessarily mean that things are problem-free. Also, even if a warning is activating, it might be showing up when the framerate is already very good, so just because the scripts are taking a large percentage of each frametime, does not mean this would affect things in a way that a player would ever notice, simply because it would be happening faster than the human eye would be able to see.
Performance warnings are hardcoded into HeroEngine, and cannot be modified by licensees unless they have a source code license. If you need a different type of warning, or wish to modify the threshold at which a warning appears, please contact support.
Types
HeroScript Exec
HeroScript exec 20% 4ms
Cause: Something in the scripting engine took more than 20% of current frametime.
Solution: Optimize, or reduce the need for script calls
World Update
Cause: Took over 40% of total time. This does not include animations, but does include:
- Moving/translating characters
- Transforming bones
- Anything else that moves
- Anything that changes from frame to frame
- Particles
- Game logic (scripts)
Particle Update
- See also: Particle effects
Cause: Took over 25% of total time. May be caused by:
- Too many particles
- Too many particles may be too large
- Glow effects
- Collision may be a big cause of this
Particle Collision
- See also: Particle effects
Cause: Took over 10% of total time.
Solution: Turn off particle collision or reduce their number
FireStorm Pump
- Main page: FireStorm
Cause: Took more than 30% of total time when resources are loaded into the game:
- A resource is too big
- A lot of resources are being requested
SelectActiveRoom
Cause: Took more than 10% of time.
This is simply the act of identifying which room you are in. If this goes off, it is likely that a developer made a fundamental error somewhere, or some other previously unknown limitation has appeared. In general practice, you should never see this light.
Trail Rendering
- See also: Particle effects
Cause: Took more than 20% of total time
- Too many trails
- Trails are too long
Plant Emitter Update
Cause: Took more than 10% of total time
- Too many dynamic details
- Dynamic detail settings are too high
- A particle emitter or particle needs adjusting (especially if it is using MESH particles)
Collision System
Cause: Took more than 10% of total time.
- Too many collision assets (which means an area probably got out of hand a long time ago)
- A programmer goof
- Some previously unknown limitation