No, unfortunately there isn’t a way to do lazy loading for views.
I think the virtualized
feature should work though, but I can’t say I’ve tested it; any feedback you could provide about it would be helpful.
No, unfortunately there isn’t a way to do lazy loading for views.
I think the virtualized
feature should work though, but I can’t say I’ve tested it; any feedback you could provide about it would be helpful.
Think I came up with a solution. Atleast it seems to work quite good.
I load images from a database stored as varbinary and I want to stop this if the Swiper contains alot of images.
def valueChanged(self, previousValue, currentValue, origin, missedEvents):
if currentValue.value == True and self.view.custom.image == "":
import base64
sqlParams = {"imageId": self.view.params.imageId}
image = system.db.runNamedQuery("getImage", sqlParams).getValueAt(0,0)
self.view.custom.image = base64.b64encode(image)
def realIndex(self):
component = self.getChild("Swiper")
proxy = component.getJavaScriptProxy("swiper")
currentIndex = proxy.runBlocking('''() => this.realIndex''')
if currentIndex != self.view.custom.currentIndex:
self.view.custom.currentIndex = currentIndex
for i in range(3):
self.getChild("Swiper").props.instances[currentIndex + i].viewParams.load = True
def runAction(self, event):
self.parent.realIndex()
This seems to work fine for me. But I'm not really sure how effecient it is. And depending on the Swiper settings it could cause the message to not get triggered enough (more dots (have to preload more then +2), or with a scroll etc.). If there was a better way to get the current index it would probably work better.
EDIT: Used Message Handler on the Embedded Views to load the images but felt wrong to send out a message that ~100 views handled on each Swiper-click. This solution feels better, but I'm open for a better one
Hi @bmusson,
I'm trying the chart and periscope module on ignition 8.3 beta1:
but is seems it's not compiled for 8.3.0-beta1 yet:
Error
Module "Embr Charts" requires Ignition 8.1.33 (b0) and is not compatible with Ignition 8.3.0-beta1 (b2025072515)
Do intend to release a version of the module for the 8.3 beta?
Yup. I’m out on vacation for a while, but getting Embr compiling for 8.3 is a high priority once I get back.
Embr-Periscope for the Ignition 8.3 beta can be found here:
Thank you.