I have saved all data for my app to a realtime database. I have learned through helpful people on this forum that this means it is saved in a JSON format. Which is great now I am finally learning how to use JSON better (I do not come from a programming background or even really a computer background so I am learning a lot as I go. Again, lots and lots of thanks to the thunkable leaders and freelancers on this forum.
My question is this; how long does it take to download say 10mb of JSON data? I appreciate that this is largely dependent on network speed etc. but with optimal speed of network and mobile phone performance is there a time frame that can be speculated?
The reason I ask is, I am creating an app which users can load up pictures of their cars and give some basic information on it. Kind of like a car show app but without needing to physically go to a show. Think of it as a social media platform specifically for car enthusiasts. At the moment I have the app calling the server specifically for the information related to each individual car that is showing on screen. This is fine when there is just a few cars to see but when the numbers rise it tends to take a little longer as can be expected. I am wondering whether I would be better served by loading all the information into a variable on screen start then simply looking for the data locally. But will this cause problems down the line if I have say 10000 cars to call information for. Each of those 10000 items will have 10 sub-items related to things like the car make, model etc.
Do users need to see or have access to all 10,000 (using your example) cars at one time? Or can you load subsets of your data? For example, you might load the first 100 cars and display them and then get the next 100 as needed. Of course, if you’re planning to have users sort or filter cars, then you might need all 10,000 at once.
Yeah I do have the intention for users to be able to filter what cars they see. What I have the app doing at present is reading a list of reference numbers to identify cars that they should be able to see. The app then uses these reference numbers to search in the database for the rest of the details relating to this car. Is this a convoluted way of achieving my desired result? I’ll give an example here:
On the database under folder path “cars/carsAvailable/” is a list of reference numbers which I have assigned as the “users firebase sign in ID” followed by “CARREFER001”.
The app then searches under folder path “cars/carDetails/unique car reference number/”. In this folder path it contains; make, model, trim, owner UID, car reference number, pictures 1-10, car biography, upvotes, competition wins, competitions participating in. So that’s 19 items not 10 like I originally said.
Is this a lot of data? Is it likely to take a while to download it all or am I correct in thinking the JSON nature of it means it will be relatively quick and use little data as far as kb, mb etc.?
I think that two-path approach can work fine. I’m not sure I can answer your question about how long a large JSON data set will take to download. But JSON is just text so it shouldn’t take up much room.
So you might temporarily replace your Firebase path with data from there and test the speed of it in your Thunkable App. Just make sure to backup any existing Firebase data before you do that.
That’s a good idea though thankyou. It should help give me an idea on what to expect shouldn’t it? I appreciate it is difficult to say it will take x amount of time. I don’t mind it taking a couple seconds but we humans have short attention spans so I just wanted to see whether it was worth looking for quicker methods. This has been helpful though thankyou