mddub / urchin-cgm

A graph of your CGM data on a Pebble watch.
MIT License
56 stars 45 forks source link

Reduce memory footprint by 1.5K #52

Closed mddub closed 8 years ago

mddub commented 8 years ago

Graphing future predictions will require a larger AppMessage buffer and more space for the DataMessage struct (and, of course, memory for the new code). In order to support this feature on Aplite, the existing memory usage must be reduced significantly.

Before:

APLITE APP MEMORY USAGE
Total size of resources:        5940 bytes / 128KB
Total footprint in RAM:         19957 bytes / 24KB
Free RAM available (heap):      4619 bytes

Heap free (layout "C"):         552 bytes

After:

APLITE APP MEMORY USAGE
Total size of resources:        5940 bytes / 128KB
Total footprint in RAM:         18389 bytes / 24KB
Free RAM available (heap):      6187 bytes

Heap free (layout "C"):         2120 bytes