You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some data structs that are loaded via serde and contain SVG data inside them. As I need to display all the images found, I loop through all maps within them and load the images.
Right now, this is happening within the rendering process, which means it runs once a frame. Now I know the images are cached in theory and are not reloaded every frame but the looping through maps in theory still runs.
What is the best way to only run this code at application start or on demand?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have some data structs that are loaded via
serdeand contain SVG data inside them. As I need to display all the images found, I loop through all maps within them and load the images.Right now, this is happening within the rendering process, which means it runs once a frame. Now I know the images are cached in theory and are not reloaded every frame but the looping through maps in theory still runs.
What is the best way to only run this code at application start or on demand?
Beta Was this translation helpful? Give feedback.
All reactions