I'm currently working on performance optimizations using the Connect IQ profilers, but I'm encountering highly inconsistent results. In several cases, extremely simple functions appear to take disproportionately long to execute, according to the profiler output.
A particularly clear example of this issue is shown in the code sample I'll post in the comments: two nearly identical functions are profiled, yet their reported execution times differ significantly.
I previously reported a potentially related issue regarding mislabeled profiler entries:
https://forums.garmin.com/developer/connect-iq/i/bug-reports/incorrect-background-registerforsleepevent-entries-in-profiler
It seems possible that something similar is happening here—perhaps another function is being incorrectly labeled as getValueColor
, leading to misleading results.