conservationtechlab / dencam

Polar bear maternal den observation system.
MIT License
3 stars 2 forks source link

In `mppt.get_solardisplay_info` last row of solar log retrieved in an inefficient way #79

Open iingram opened 2 weeks ago

iingram commented 2 weeks ago

Currently, to get the last row of the solar log the code is reading through every single row and essentially discarding all of them except for the very last one. This is not very efficient and could create performance issues on longer logs (not sure how long a log is required to create a notable performance issue but noticeable lags have been anecdotally observed).

iingram commented 2 weeks ago

First step should be to verify that the time used by the current implementation is actually worth expending effort on. What is the longest log file we have seen in the wild? We should time it on that. But also: we're planning to sample significantly more frequently going forward so these solar log files are thus also likely to get significantly longer.