DATAGRID: slow scrolling even in the IDE
bobs at twft.com
Mon Jun 4 18:54:08 EDT 2012
Someone will correct me if I am wrong, but datagrids do not work that way. Only the visible rows are "loaded" and if I am not mistaken, one prior row and one trailing row. This means that if you scroll away, then re-scroll, the datagrid is going to reload that data.
I think some kind of strategy to load images in the background (is that even possible) while the rest of the data is displayed, on a first time basis (if image is not found locally then download image to repository) is the way to go. If the image is found locally use that.
This is probably more work that you are wanting to do here, but if the goal is to make your app compact to load and install, and yet capable of displaying lots of images, then it seems you are going to have to find some kind of optimization strategy.
On Jun 4, 2012, at 3:45 PM, Matthias Rebbe wrote:
> Yes your right, but to explain more precisely.
> My ios app shall fetch data from a "local" sqlite database. This data contains also the URL to an image.
> The fetched data shall be displayed immediately in the form. it could happen that about 200 records have to be put in the datagrid.
> If i have to download 200 images first before i can display the datagrid, then this takes definitely to long. Because of that i thought
> i would use the http: Url for the image filename. The datagrid would be populated immediately and the images are loaded while the datagrid is displayed.
> My problem is, that the scrolling stopped although all images were loaded already. I know that, because i scrolled from top to bottom and all images were display.
> Am 05.06.2012 um 00:16 schrieb Ken Corey:
>> On 04/06/2012 22:52, Matthias Rebbe wrote:
>>> for an iOS app i need the possibility to show several records, each with one image and 4 text fields.
>>> I am now experimenting in the ide to find out how to do that.
>>> I thought a datagrid form might be the right solution for that.
>>> The following happens in the ide. I did not try under iOS, but it i am sure it´s the same.
>>> My row template contains 3 fields and one image (fixed size 60x60).
>>> The image (each about 15bk) is fetched from a web server. So i set the filename of the image to the "http:.." url.
>>> When i scroll the records the scrolling stops several times, although all images seemed to be loaded.
>>> When i use local files then the scrolling is smooth.
>>> Is there something i can do?
>> Surely you don't want to fetch an image (even a small one) each time it needs to be displayed.
>> Why not download the images to specialFolderPath(documents), at which point you're local, so you can point your datagrid at them there?
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode