I’m developing a movie application, and so far everything is going very well. I’m retrieving data using Firebase Realtime Database and pulling it into the application using a web component.
I’ve added 51 movies now and there’s no lag, although there are occasional slight issues.
I had an idea: If we save the data the first time we log into the application using TinyDB, would the application be faster on subsequent logins?
By data, I mean photos or text, whichever is more functional and performs better.
I tried to do it myself, but I couldn’t figure it out at all. I guess I lack the knowledge for that.
Today marks my first year on Kodular! I’m so happy to have discovered this platform. Thank you everyone!
Hi dear, I’m glad you managed to solve all the issues
First of all, you need to understand where these slowdowns are coming from.
If you’re using DynamicComponents, the problem is likely there, until all the objects are created, the app will be frozen.
If you want to do a practical test, try keeping only one movie in the database and see if it loads faster (since it has to create just one object, it should be almost instant).
Another issue could be the images, if they are loaded via URL, they also need to be downloaded temporarily, which slows down the loading.
Instead of using TinyDB, I would recommend using an extension for image caching, this topic could help.
What I want isn’t to be able to access the app offline; I want photos to load faster when I log into the app.
Because right now there are only movies, I’ll add TV series later, which might slow down the app.
Hey there, happy anniversary. It’s good to know that, the list is growing and everything is going well.
Decide one thing, before the list grows with series and anime. ★Store the thumbnails not in their original size, reduce it upto 60-75% before storing them in RTDB. ★Second thing is lazy loading, this means you’ll not be active when you wake up, you’ll be lazy right…! Apply that over here. ★Finally comes your idea.
Think through before hand. These above options have advantages and dis… So choose… ★?
As you can see, it’s a common recommendation to use RecyclerList + LazyLoading
(I had already suggested it to you in another of your topics )
But we all agree because RecyclerList is very performant since, simply put, it renders only the items that are on screen, which makes it really smooth and without “slowdowns”
However, you can achieve this only after studying how they work
Some time ago I created a guide, try taking a look at it.
Then, if you need to better understand how the extension works, feel free to refer to this reply
Come let me know, how much sense do you need…?
This is a clear cut guide by ray.
I forgot to ask you about firebase →
What came to your mind to store images in RTDB?
Are you aware of the limitations, like storage and downloads?
Have you heard of firebase storage?
Have you thought about implementing sheets, for your URLs and images?
Firebase seemed like the easiest way for me. I looked at the forms of a few people who were making movie apps in the code, and most of them were using Firebase.That’s why I did it with Firebase. I don’t know if there’s an easier way.
Are there any limitations in Firebase? I didn’t know that. Could you please provide me with information?
There are limits on how you use the data, not even the platform you are using to build this app. Nothing is for free…
Firebase
★The storage is of 1 GB
★The data download per day is of 360 MB.
You can upload as much as you’d like but download is limited.
This might be one of the reasons for the images, to load slower in the app. The images you are storing in RTDB is → heavy, which makes slower for sure. Store the images in firebase storage, it uses CDN.
Edit:
Imagine your images are of 1 MB each, when you fetch the data from RTDB (right now you have say 50 images) it will be like 50MB on each refresh. When your app grows you’ll be hitting the limit in just 1 fetch, which is definitely gonna cost you.
At first it seems, driving a car is complicated - judgement, stearing, shifting etc. But as you learn the way things work, you can literally drift it…
So create a duplicate of your current project and do the things over there. Play with the blocks, learn the way things work, by following the guide above and later you can drift the blocks away.
I’ve actually decided to use Recycler List. Which extension should I use?
I’ll handle things like lazy loading later. Right now, I think using a recycler list is the best solution, as you suggested.