Load Screen Assets on Screen Transition

What do you want to achieve?

I am working with a memory constrained device which is loading assets from external QSPI Flash. I see that the generated code from SLS will load and buffer all the assets on startup. In order to limit RAM usage, it would be nice to only load the assets on a transition or whenever they’re needed, then free them when transitioning again. I understand this will increase latency between screen transitions but the tradeoff is acceptable in my case.

Do you see alternative options and workaround to achieve it?

I am currently scripting changes to the generated C code from SLS. (Just had a thought, might be nice to support custom script execution as part of the export ui process. I need to concatenate all the binaries for instance)

Mention some use cases

Mark screen as temporary in designer.

Oh nice! However, I still see all my images loaded in ui_init():

ui_img_cursor_png_load();

which allocates a buffer etc:

void ui_img_cursor_png_load()
{
ui_img_cursor_png.data = UI_LOAD_IMAGE(“S:assets/ui_img_cursor_png.bin”, 2352);
ui_img_cursor_png.data_size = 2352;
}

I dont use v 1.4 now then dont see this loading, but i preffer own code for this.

Thank you for the suggestion, makes sense to have this refined (like respecting ‘temporary screen’ flag), I’ll forward it asap to the feature-request list for the respective developers to see it.