I have a project where the login screen has a full screen background Image. After the user logs in, using the system.security.switchuser script, all the open windows are reloaded. I understand that this is the default behavior of this script and I also understand why it is doing it.
When the login page reloads, the background image seems like it has to re-cache. For a brief time, there is no image and instead a small in the center of the window. This has a jarring look to it and I would prefer if there was some way to avoid this.
The image is set to both useCache and loadInBackground. These seem to be the only 2 settings in the Image component that would affect the loading. It almost seems like the image is re-cached.
My other thought is that there is a processing time when scaling the image. The login window is locked at 1024x768. The image that I am loading is 800x600. If the image was re-scaled to 1024x768, would the loading be faster? I guess I can test this part pretty easily.
update::
I scaled the image to 1024x768 and used the new image as the background. It did not help. When the window reloads after the switchuser script, the image has to reload and the user sees an in the middle of the screen.
Pretty sure the cache doesn't survive the user switch (probably deliberate, to ensure the cache doesn't hold something the new user is not allowed to see).
Tip: Ignition doesn't have "screens". Vision has windows and Perspective has views. You've mentioned windows in your post so I've add the vision tag to your question. Please correct it if it is not correct.
@Transistor
This is in regards to Vision. I have a window that is essentially a splash screen. It is the first window that the user sees when the projects loads.
@pturmel
The image is stored in Ignition's Image Management.
I may have found a "solution"; more of a hacky work-around.
Instead of using the Image component, I have switched to a Button component. The button takes up the entire screen. There is no script in the actionPerformed. The Text field is blank. The Image Path field is set to the background image.
When the window is loaded, the image processes much faster. The same goes for after the switchuser script is run.
Like I said, it feels a bit hacky to do it this way. There seems like there should be a way to quickly load images and store them in cache through the Image component.
A png or jpg has to come from the gateway. So there is se lag when that happens based on the network. If you can make it with native objects then it is quicker response.