Discrepancy in memory usage in Vivoactive

Former Member
Former Member
Hello There,

I am working on optimizing the memory usage of my app so that I can add more features. My app, step monkey (https://apps.garmin.com/en-US/apps/dc448aa9-0882-4abb-8637-7107695cc1f4), is designed for all of the available connect IQ watches, utilizing resource overrides for each device as needed. In terms of the images used, the vivoactive uses image assets with different colors that are available in it's palette and not in the other watches.

The memory usage on the vivoactive is around ~60KB where as on all the other watches it is ~48KB. I had thought this was due to the image assets used but I switched to using the same assets as my forerunner 920 build and the memory usage still stays at ~60KB.

Does anyone have an idea why an additional 2KBs is being used? Again, I am using the same resource files as being used with the forerunner920.

I used a simulator as well as a real vivoactive. Both report similar numbers.

Thanks in advance.

Braden
  • Here's a thread that discusses this.

    https://forums.garmin.com/showthread.php?318370-Compiled-size-for-watch-face&p=707466#post707466

    The VivoActive maps your images to 64 colors where some of the other watches only map to 16 so the same image takes more memory on a VA than on other watches.

    Here's how to force the VA to use fewer colors.

    https://forums.garmin.com/showthread.php?210192-Changes-to-Datafield-Memory-Limit&p=519373#post519373
  • Former Member
    Former Member over 9 years ago
    Here's a thread that discusses this.

    https://forums.garmin.com/showthread.php?318370-Compiled-size-for-watch-face&p=707466#post707466

    The VivoActive maps your images to 64 colors where some of the other watches only map to 16 so the same image takes more memory on a VA than on other watches.

    Here's how to force the VA to use fewer colors.

    https://forums.garmin.com/showthread.php?210192-Changes-to-Datafield-Memory-Limit&p=519373#post519373


    Oh I see. So even though I am using the reduced palette it is still mapping to the 64 color space. Does it matter what colours are used for this trick? That is, is this trick limited to the colors avaialble on the fenix, fr920, etc?

    On a side note, are the 64 colours available on the VA documented anywhere?

    Thank you,

    Braden
  • Oh I see. So even though I am using the reduced palette it is still mapping to the 64 color space. Does it matter what colours are used for this trick? That is, is this trick limited to the colors avaialble on the fenix, fr920, etc?

    On a side note, are the 64 colours available on the VA documented anywhere?

    Thank you,

    Braden


    Someone here generated this - shows the 64 colors as well as the 16

    https://docs.google.com/spreadsheets/d/1moYO2F3ltqbEde_vHaoKstnXLRR4AgQgQ4Yp_aGQPn4/edit#gid=0
  • Former Member
    Former Member over 9 years ago
    Oh I see. So even though I am using the reduced palette it is still mapping to the 64 color space. Does it matter what colours are used for this trick? That is, is this trick limited to the colors avaialble on the fenix, fr920, etc?

    On a side note, are the 64 colours available on the VA documented anywhere?

    Thank you,

    Braden


    You can palette image resources with any of the colors on the device it is targeted for. On the VivoActive you can specify any of the 64 colors available on the device.

    The palette space will be built with the smallest 'power of 2' bits possible. When using the full 64 color space, VivoActive images will require 1 byte (8 bits) per pixel. The image size will be cut in half if you specify a palette with 15 or less colors (one color is always reserved for transparent). That size should match the images size of images built for Fenix 3 and FR920XT.

    Reducing the color palette of an image to 3 colors or 1 color would cut sizes further.
  • Former Member
    Former Member over 9 years ago
    You can palette image resources with any of the colors on the device it is targeted for. On the VivoActive you can specify any of the 64 colors available on the device.

    The palette space will be built with the smallest 'power of 2' bits possible. When using the full 64 color space, VivoActive images will require 1 byte (8 bits) per pixel. The image size will be cut in half if you specify a palette with 15 or less colors (one color is always reserved for transparent). That size should match the images size of images built for Fenix 3 and FR920XT.

    Reducing the color palette of an image to 3 colors or 1 color would cut sizes further.


    Awesome! Thanks for the tip I greatly appreciate the clarification. One more thing. In order reduced the image size does the palette have to be global? Lets say that I have a two different images with different 3 colour colour-palettes (4 with transparency), the images would still be reduced in size despite their being a total of 6 colours used in my app?

    Thanks again for all the help,

    Braden
  • Former Member
    Former Member over 9 years ago
    Awesome! Thanks for the tip I greatly appreciate the clarification. One more thing. In order reduced the image size does the palette have to be global? Lets say that I have a two different images with different 3 colour colour-palettes (4 with transparency), the images would still be reduced in size despite their being a total of 6 colours used in my app?

    Thanks again for all the help,

    Braden


    The palettes apply only to the individual image they are assigned to, so you can use 2 completely different 3 color palettes on two different images and they will both be compressed using their own palette. The resulting bitmap resources would be 4x smaller than they are without a palette on VivoActive and Epix, and 2x smaller on Fenix 3 and FR920XT.