I am writing a SwiftUI app that uses a single Task(priority: .low)
to do lots of HTTP requests as a low priority whose results are displayed in a Table
.
There's several hundreds of MBs of data being aggregated to display totals, averages etc.
Thing is, I am only creating one Task
, but this is causing my UI to hang. Why is this? I think I must have a fundamental misunderstanding around how tasks are created and how they relate to processes and threads.
I am using Mongo's Realm to store the data having become frustrated with Core Data. Does anyone have any experience of agonisingly slow apps using Realm?
There is far too much code to post, but all the HTTP requests are being made using URLSession
's async methods. These data are being transformed and saved in my Realm. In any case, I certainly wouldn't expect this to cause the UI to hang! What might be going on?
I know it's tough to triage without code, but as I say there is a lot of it. Iām just after general guidance really, rather than a fix for a very specific issue.