Import photos from AirTable into device

I now have a grid of 25 cloned buttons with background pictures set to unique images pulled from an AirTable spreadsheet. But updating those 25 images (and associated names; this is a student directory app) on the fly is proving slow. It takes about 5 seconds on an iPhone 8 to refresh the screen with updated content.

Is there a way I can pull images from AirTable and store them locally on the device? Ideally, the user (teacher) would download the entire spreadsheet from AirTable on first run and then not have to access the spreadsheet ever again unless the data was updated by an administrator who sent a push notification about an available update.

I also read something about a 50 MB limit to local storage. Is that still the case? That seems awfully low but I think I could get away with that limit if it still exists. My photos come in at about 30 MB total.

Thunkable X does not work with the file system and you can save images only in base64 format, for which each image will have to be transcoded into this format, which will take a lot of time.

I think that caching should work in Tunkable X, but in practice the situation is that the components themselves in Thunkable X work very slowly and this leads to big problems.

I may be wrong, but it may happen that downloading photos from AirTable is much faster than displaying them on the screen. I think on my Android your photos will be displayed for 15 seconds.

Best regards, Alex
ACtech demo project
Thunkable X Basic Programming Course
Block Reference
Component Reference
Bug tracker

This website allows conversion of 20 images at once to base64 format. But I’m hoping to be able to build an app that allows school administrators to supply their own images. It wouldn’t really work to ask them to convert them to base64 before uploading them to a spreadsheet. I suppose they could send them to me and I could do the conversions but… it’s doubtful they’d want to do that.

What do you mean by caching? Do you mean pre-loading the images in a hidden screen and then displaying them once loaded? If so, I’d have to reconfigure my app to have a screen for each class of students rather than cloning buttons on a single scene (or laying out the 25 buttons manually). I thought about doing it that way since I programmed this app in a different tool and pre-loaded everything. Maybe that’s the quickest way to get images to load properly but it again doesn’t solve the problem of needing images stored in the cloud.

There are blocks in the project for testing the speed of the blocks. You can use them to determine the speed of your units when performing various operations, for example, receiving all data from AirTable, displaying all data on the screen, and so on. This is necessary in order to start optimizing the slowest-performing function. Otherwise, it may turn out that you will spend a lot of time optimizing the sides, which will give a 1% increase in speed, because they work fast anyway.

https://x.thunkable.com/projects/5db93ebab8e0fc9c685b3477/project/properties/designer/

You can also see the results of my testing on the page http://droidscript.ru/main/statyi/thunkablex_base11.php

Best regards, Alex
ACtech demo project
Thunkable X Basic Programming Course
Block Reference
Component Reference
Bug tracker

2 Likes

this situation is my main problem. Slow blocks and loops. This is a great writing.

For this too, uploading pictures to cloudinary may be a good option. You can request the images at a lower quality and greatly reduce the load time.

Well. Its not about pictures. Even there is no picture in a whole table, it takes at least 52-59 seconds to scan and display only 50 records in screen (listview or clone label) from a table with just one column and 1000 rows. (airtable)
http://droidscript.ru/main/statyi/thunkablex_base11.php in this link it was explained but I think there is no exact solution yet.

This is problem because every single users told me “waiting is boring”.
this badly affects usage of app.

I do not experience such a long wait. Even with large lists of just text. The if I use Firebase and clone, yes. If I simply retrieve a list of text and put into the list viewer. This is very fast. Only a few seconds sometimes.

Adsız

In this block, there are 500 rows.
First I find current position of user
Then I compare position with the latitude and longitude datas in every single row in airtable.
If user’s position in the row’s lat-long range (0,005±), it results with inserting data to listview.

This takes approxiamtely 1 minute to finish. I dont know how will it take when the number of rows hit 10000 or more! I need serious help with this.
@jared @actech