Complete

This is by design.

The settings are being serialized to send to the simulator or phone.

opening settings editor consumes app memory

sdk 4.0.7
eclipse CIQ plug in: 4.1.0.beta1
eclipse ver: 2021-09 (4.21.0) Build id: 20210910-1417
windows 10
watch face
minSdkVersion 2.4.0

CASE 1

wf starts, peak memory 88.0

[ecilpse][app settings editor] - open only window and choose project (no push any buttons), peak memory 90.0

CASE 2

wf starts, peak memory 88.0

[simulator][property data]  - open only window (no push any buttons), peak memory 90.0

In both cases there is no calls for app.onSettingsChanged, settings data exist in memory so there shouldn't additional memory consumption.

Now, when you have e.g. 90.5 kB used from 92 there is an error "unable to serialise data" or "out of memory exception" if i choose OK in setting editor.

  • sdk 4.0.9

    - app starts, change to low power  - I don't read settings during low power
    --memory usage 70.3, peak 71.1, app settings 1.369
    - [eclipse][qonnect IQ][App settings editor], choose from combo only app that run in sim
    --memory usage 70.3, peak 73.5 <-------- + 2.4kB
    - [send settings] without any changing
    -memory usage 70.3, peak 74.4  <-------- + 0.9kB
    - exit from low power reading settings
    -memory usage 70.3, peak 74.4 - didn't change because probably below previous peak

  • I have been unable to reproduce this issue. I am running on a beta2 plugin. That is the only thing different, but I've tried loading up one of our WFs with app settings. I watched the peak memory usage and when I opened the app settings editor the memory stayed the same. There was no increase either when I pushed changes through the same menu. I did see an increase in memory when I went into the app settings via the sim > "Trigger App Settings".

  • sdk 4.0.7
    eclipse CIQ plug in: 4.1.0.beta2 <------------------- new SDK
    eclipse Version: 2021-12 (4.22.0) Build id: 20211202-1639 <----------- new eclipse
    windows 10
    watch face
    minSdkVersion 2.4.0

    and now I can see strange behaviour of settings

    - app starts 54.8kB

    - run [app settings editor] from eclipse, do nothing and save

    - mem 54.3kB

    this for case when device has own settings/properties  than default

    it means that ciq has in memory all settings and then user try to change settings there is merging and delete unused

    I prepare different scopes of settings for devices to save memory  but  you can see it is waste of time if user can't change settings and it default when user setups app (nobody change settings everyday.)

  • One more thing. When setProperty/getProperty is called and it's impossible to load setting due memory exception is thrown but it is impossible to catch it:

    function getPrp(key, ifnull)
    {
        try
        {
            key = PRP.getValue(key);
        }
        catch(ex)
        {
            key = null;
        }
        
        return key == null ? ifnull: key;
    }

    Error Name: Unhandled Exception

    Occurrences: 2
    First Occurrence: 2021-12-05
    Last Occurrence: 2021-12-05
    Devices:
        fÄ“nix® 6X Pro / 6X Sapphire / 6X Pro Solar / tactix® Delta Sapphire / Delta Solar / Delta Solar - Ballistics Edition / quatix® 6X / 6X Solar / 6X Dual Power: 20.00

    So the best solution is simple return null, everybody should handle.

  • So it's good news that only *table* is loaded Slight smile

    There several "type" of strings:

    - system - for settings, properties, app name etc - nothing to do

    - text for users, usually language dependent

    - "data"  you can put any data into string and convert to number, double etc

    Solution depends on situation, but you can do always one thing. When app starts, you have a lot of memory so you can put all non system string in one and parse it and insert into storage at form match your requirements (e.g. months/weekday into array of string). After then you can access string as you want without loading rez/strings any more (or rather to time when you don't change strings).

    No I've cleared my code and save a few kB so it's ok, The problem is with new SDK e.g new memory bomb e.g. connectionInfo 332b adding to getDeviceSettings...

    And also 2 thing CONST and ENUM, it is incredible that it consumes memory they are common variables so why somebody add? For autnum of enum? To save memory we need #define statement which puts defined values  into code...

    But subject of this thread is settings. Why there is the peak? If I have several WF and somebody change settings in non active WF system cane do it so why there is the peak if app runs? Why settings can't run like strings?