Help for the Movie App

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.:grinning_face:

Today marks my first year on Kodular! I’m so happy to have discovered this platform. Thank you everyone!:heart:

Where do you host movies?

Hi dear, I’m glad you managed to solve all the issues :partying_face:

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. :blush:★Finally comes your idea.

Think through before hand. These above options have advantages and dis… So choose… ★?

2 Likes

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 :grin:)
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 :nerd_face:

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

I tried to implement lazy loading but couldn’t. I read a few guides, but they didn’t make much sense.Can you help me with this?

Come let me know, how much sense do you need…? :thinking::thinking::thinking:
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?

1 Like

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 :backhand_index_pointing_down:
★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.

1 Like

Hi Vega,

Sorry if I keep jumping into your replies, but if Dogukan hasn’t made changes to the DB, the structure was this:

Where image and video are retrieved via URL, so he’s not using Storage, only RTDB.

So the only thing he needs to do, as we suggested, is to use RecyclerList + Lazy Loading + image caching.

1 Like

Don’t be please… It’s good to argue to learn something.

I forgot.

Yep… :100:

1 Like

I have absolutely no idea how to do lazy loading. I’ve read forums but they all seem very complicated. Can you please help me?

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.

1 Like

Do I need to delete the dynamicComponents blocks I’m currently using? I’ve placed the blocks inside procedures.

Yep you need to, but don’t delete them, instead disable them… Do it in the duplicated project. Don’t touch the main.

I finally managed to create a Recycler List View! Ah, I really thought I wouldn’t be able to do it. Thanks for your advice!:heart:

2 Likes