Repository navigation
Closed
Description
DataProcessing/siteupdate/cplusplus/classes/TravelerList/userlog.cpp
Lines 32 to 41 in 9dcf0a5
| unsigned int active_systems = 0; | |
| unsigned int preview_systems = 0; | |
| // present stats by system here, also generate entries for | |
| // DB table clinchedSystemMileageByRegion as we compute and | |
| // have the data handy | |
| for (HighwaySystem *h : HighwaySystem::syslist) | |
| if (h->active_or_preview()) | |
| { if (h->active()) active_systems++; | |
| else preview_systems++; |
DataProcessing/siteupdate/python-teresco/siteupdate.py
Lines 3543 to 3554 in cc9da66
| active_systems = 0 | |
| preview_systems = 0 | |
| # present stats by system here, also generate entries for | |
| # DB table clinchedSystemMileageByRegion as we compute and | |
| # have the data handy | |
| for h in highway_systems: | |
| if h.active_or_preview(): | |
| if h.active(): | |
| active_systems += 1 | |
| else: | |
| preview_systems += 1 |
These values don't need to be computed for every user log. Compute once, while
- writing highwaydatastats.log, or
- reading systems.csv <--probably this?
- or like whatever
While in there, should also remove the comment, as csmbr_values is no longer a thing as of 9dcf0a5.
Activity
region management / remove redundant computation