I made a simple XData server connected to a mySQL database, with some string data and pictures stored in blob fields.
The client application is based on Aurelius tables, connected to a Tlistview.
Everything works, except that I have noticed the application performance is degraded while waiting to load the remote images (blob fields) from the server i.e. it is not responsive until it completes loading of all the images.
Is there any way to set Aurelius so that the basic fields (strings, integers etc.) are loaded immediately, while images are loaded in background in a separate thread ?
I imagine there is not an easy solution but neverthless I am trying to ask
If your mapping includes lazy loading of blobs, the blobs will be loaded on demand, when read (not in separated thread though). Isn't it enough for you?
Hallo Wagner, thanks for reply. I will check the lazy loading settings, what do you mean for loaded "on demand" ?
I
mean, for example, in case of a TListview showing a list of hundreds of
records, pictures from blob fields will be loaded only when the
specific records becomes visible while scrolling ?
in the meantime I found this sample from Woll2Woll blog that I will try to adapt to our scenario with Aurelius:
By "on demand" I mean the blob is only loaded when its data is requested, in this case, when the property with blob data is read
TheData := MyObject.BlobProperty;
Since it's a TListView, it really depends on how you are loading it. If you are loading all records in advance and already setting list view content with blob data, then you will have to load all data in advance anyway. But if somehow you are able to request the blob data only for the visible records, then it will be possible. But this is more related to the behavior of component itself than XData.