Relative Content

Tag Archive for xcodefirebaseswiftui

Async Await or Completion Handlers?

I am building a social networking app with SwiftUI, and I currently am using completion handlers method. Is async await better for fetching large datasets? I am using Firebase and my social network is going to be large scale.

When navigating to the home view, it takes a long time to load, and when navigating back from the FullPostCell, it takes seconds to navigate back

The Home View (or any view with posts populated) is very slow, and after debugging, I found out that the filtering was NOT causing the problem. For some reason, it isn’t slow on the simulator, but on an actual device it is very slow, especially after posts loading.
I also debugged a bunch of times, and I’m still unable to figure out this problem, nothing in the debugs showing what’s causing it, but my guess is its a bottlenecking problem.