boblemaire / IoTaWatt

IoTaWatt Open WiFi Electric Energy Monitor
https://iotawatt.com
GNU General Public License v3.0
640 stars 177 forks source link

Reduce heap requirement to process config #261

Closed boblemaire closed 4 years ago

boblemaire commented 4 years ago

The process to set dynamic phase correction arrays for inputs was consuming an astonishing 16K when processing the congfig file. Not a problem at startup but done each time a configuration change is made while running. Was causing unexplained exceptions due to heap allocation failure. New process does not Json parse table file, but works directly on file. Extra savings on using same arrays for like models.