Load Images Into Memory

Klaus major-k klaus at major-k.de
Thu Feb 7 09:55:08 EST 2019


Hi Swami,

> Am 07.02.2019 um 15:48 schrieb Sannyasin Brahmanathaswami via use-livecode <use-livecode at lists.runrev.com>:
> 
> On mobile, you need one stack always open.
> 
> Which is typically is the standalone, including init all libs, models, livecodescript stacks etc. I call it the 
> BootStack
> You hide it right away.
> Additionally on  Cards 2,3,4,5 etc. of the boot stack, I’ll keep images which we use anywhere in the app as icons to buttons.
> 
> So, you boot the app, (splash screen is left blank nothing that a background color); it is hidden and you open the "Main" stack.  Call it the 
> Stack 1
> 
> Now:
> -- if you have images in card 4 of the BootStack that are referenced from disk for 10 images, they are really small images  7K to 39K, less an 250K total
> and
> - Stack 1  on card 3 you have a ten button panel with id for icons taken from the ID's of image of the BootStack, card 4
> What Happens (I think, not really sure) 
> Stack 1, you for to from card 2 ( "go next") to card 3 with the ten buttons and on Android it takes 4-5 seconds! 
> But then, even if you close  Stack 1 and reopen it later, going to the card with icons it "instant" 
> 
> My intuition says, by calling the icons of card 4 of the Boot Stack (which is hidden) will are having to wait will it loads them from disk. (why it takes 4 seconds for 250K is mysterious)
> Then are they are cached by the Boot Stack,they  are instantly available and the icons of  a "future" revisit to a Stack 1,  card 3 that has those button.
> So, if I am right, how can you load images on a card that not shown, from disk, into memory?

check the command -> prepare image xyz
in the dictionary, sounds like this is what you are looking for.


Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list