Maximum Properties?

Hello,

In my Watchface app, I have 141 properties (numbers, boolean...), for position x, y, size.. for Date, Clock, Heartrate, stepcounter...
And now, it shows a new message "unable to initialize settings" in the debug window.

Is this the maximum for properties/settings in a App?

Thanks
Patrick
  • I'm not sure there's a limit on number of properties, but I recall there's a limit on size of properties, and that's a max of 8k (keys, data, structure, etc). And it could be less than 8k based on available memory in your app. As they get loaded at startup, if your app is 4k less than max memory, your properties are limited to that,
  • Okay thanks, I have a memory peak when starting the app.
    Now I have removed a large font, the error message does not appear anymore.

    Thanks for your help

    Greetings,
    Patrickcommunity.garmin.com/.../1417638.png
  • With a large custom font, you can reduce the memory by using a filter to only include the characters you need, or with bmfont, only include those you need. If it's just used for time, you only need 0 to 9 and maybe : for example.

    With 141 properties, I'm thinking they are not all tied to settings, and there's a better way to do things like the x/y for things and make things smaller.

    for example, for each target, you could use a target specific .mc with that info like f5plus.mc with

    class XandY {
    const timeX=120;
    const timeY=32;
    //etc
    }

    and then with jungles, use the .mc for the target you are building for.
  • Yes, if you are storing data in properties that you aren't exposing via settings as Jim mentions above, it might be best to use jungle files and device or device-family specific code or json data. I would lean toward the json route for raw data, but that is just a personal preference.