Skip to content

Text Highlight Customization

Ramon Viladomat edited this page Apr 24, 2023 · 4 revisions

Compile Score enabled by default the #include highlight in the text editor. This feature uses the data from the loaded build data to quickly show which dependencies were expensive so we can know at a first glance what is expensive when we code instead of an after thought after profiling.

The highlights can be configured per user in the 'Tools/Options' -> 'CompileScore'

Severities

There are 5 different levels of severities, each one associated to a color. The default color codes follor the classic videogame loot rarities:

Severity Level Color
1 (Cheap) Grey
2 Green
3 Blue
4 Purple
5 (Expensive) Gold

Display Modes

Highlight

  • Full: Glyphs + Text Highlight

image

  • Simple: Glyphs only

image

  • Disabled: Nothing, this also means that any extra parsing on the files is totally disabled

Tooltip

The mouse hover tooltip can be enabled or disabled and it will display the basic header information

image

Buckets

All includes are sorted by the attribute selected as Severity Criteria ( Max, Min, Avg, Count ). Then the system will assign each a severity level from 1 to 5. This can be configured in two different ways ( defined by Normalized Severity ):

  • Normalized Thresholds: Here the severities will be assigned by percentage in the sorted list. The percentages are defined in the Thresholds Normalized group. This means that the most expensive 20% of all the headers encounters will be considered of severity 5, the next 20% will be severity 4 and so on. It might be useful to have severity 5 only 5% to really highlight the most offenders as most of the low severity bucket slots are taken by includes of includes that are hidden to most developers.

  • Absolute Threshold: In the option the severity is assigned in isolation based on a value threshold. The threshold amounts are defined in the Thresholds Absolute group. This means that the severity will be defined by its pure time cost. This means that all the includes in the codebase can potentially be in the same level.

Changing Colors

Each severity level has its own color. In 'Tools/Options' -> 'Compile Score' -> 'Theme' the colors can be changed via a predefined theme or by each independent color.

image

Clone this wiki locally