Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: predetermine history trail draw function
On every render, we were checking the fields to determine the type of dot we are rendering. However, we don't need to do this, as the dot type can only change as part of an ASR load or configuration menu change. This change saves the draw function as a lambda when something changes, allowing us to reduce the render time by approximately 25% - went from 12ms to 8ms in testing.
- Loading branch information
Showing
2 changed files
with
77 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters