This is how my structure for every post looks like
what i’m doing is calling every post’s tag and their values and storing them in a dictionary at the start of the app.
and as the user scrolls posts are created and the info is taken from the dictionary.
but i want to know if this will be helpful in the long run, if the number of posts increases.
i tried with 50 posts it takes less than .5 sec to load every value of each post
Yeah. It’ll be helpful in the long run. Does not matter how many posts you have. If you are loading the posts as user scrolls, then your app may not have any problem. That’s the best way to load if you have too many posts.
Also, you can follow this guide to get post from Firebase as user scrolls so that there will be no need to store them in the dictionary.
I have no issues with my current structure neither loading posts as the user scrolls, everything is working perfectly fine. Thank you for your suggestion though but i’m already using UIDs as tags somewhere else.
I just want to know whether it is viable to call every value and then store the values in a dictionary as the app starts or should i call the values as the user scrolls.
2nd option
“Never waste Resources”
Your user may not even see the whole thing + Time required to load whole thing + Burden on database(I donno if it will be serious though)