I have two DFs using near identical code; the _ONLY_ difference in the code base is a Boolean toggle to change the value of "key" when doing app.getProperty(key).
On one of them, a single sport variant, the settings file has a single set of properties. On the other, which provides sport-specific settings, the settings file has a set of properties for each of the four HR_ZONE_SPORT_ constants (generic, run, bike, swim).
But...
The multi-sport version crashes out due to memory, where the single-sport version runs perfectly.
Ok, so a simple and very obvious cause... when I profile the memory:
My MAHOOSIVE settings files for the multisport are adding several hundred KB to the settings dictionary...
MY QUESTION!
Why does Garmin need to load and store the entire settings dictionary in memory when I only read it during initialize() ?
Surely, it should be an "on-demand" load in much the same way as JSON resources and String resources are?
G