issues
search
JohanDegraeve
/
xdripswift
xdrip for iOS, written in Swift
GNU General Public License v3.0
339
stars
337
forks
source link
Optimized GlucoseChartManager getTreatmentEntryChartPoints.
#361
Closed
eduardopietre
closed
2 years ago
eduardopietre
commented
2 years ago
Optimized getTreatmentEntryChartPoints to run faster.
Previously, getTreatmentEntryChartPoints was generating lag and spikes of CPU usage.
The code was optimized by reducing the amount of calls to getBgReadings.
Now getBgReadings is only called once inside getTreatmentEntryChartPoints.
Now calculateClosestYAxisValues interpolates the SGV value from the two closest bgReadings, if there are.
Profiling registered a speed up greater than 500%.
Optimized getTreatmentEntryChartPoints to run faster.