atctwo / watch-II

Firmware for my custom smart-ish-watch, mark II
MIT License
1 stars 0 forks source link

ir remote json object memory #3

Closed atctwo closed 4 years ago

atctwo commented 4 years ago

at the minute, the json deserialisation object has 10k of heap memory, which is freed after the profile data is copied into the blah blah data structures. maybe try to calculate how much memory the json profile would need at runtime? fix it fix it fix it fix it except it isn't really broken, i just think there could be a more efficient way to do the thing

atctwo commented 4 years ago

After rewriting the ir app (7e49fdde1b505ba15dd09c8d891a7f31ef0552c2), storing a specific ir profile takes 16% of ram (no spiram), other profiles may eat different amounts of ram. after closing the profile, 14% of ram is freed. the json library that is used in the new app (cJSON) only uses as much ram as needed (i think). some of the memory allocated for cJSON objects in the app isn't freed (but probably could be)