Well, I have an embedded application where our processor is not the best, which gives some problems.
Let's say I need to display images for 10 to 10 seconds, in theory, it would just make a little counter there and wait to change the image, however, because our hardware is limited, it takes more than 1s to process the image on the screen .
I then thought about doing a preload. As? Having 2 divs, being one main and one that will keep changing your visibility property to visible and hidden. While one ta displaying, before giving 10s, that would be the exchange of the other, at 7s I would load the image and then only change the visibility for it to appear.
Here's an example: link
I do not know if I can be clear, but can anyone suggest a better option for this?
Editing: According to the friend who posted in the comment that the image only appears when it is actually displayed (in this case, when it is not invisible), I came up with a possible idea:
>And if I always display the images, only changing between the z-index of them, but without letting them be invisible, theoretically, it would be being painted on the screen, however, it would be hidden behind the other waiting for the time to display. Here's an example: link
I think that way, if it were an image, it would always be processing it right?