My database has over 100k entries and anytime I access it either via @Query or a custom Fetch request it freezes my apps UI for 10+ second.
My first question is anyone having performance issues with large data sets. If so how have you found to resolve it ?
My next question is does swiftUI load the entire database into memory with the @Query. As I feel it is seeing as my app becomes very slow and partially unresponsive.
lastly if I have 2 data models and 1 has a to many relationship to the other are both loaded into memory even though only @Query 1?
consider datamodels
model1 {
var name : String
@Relationship(deleteRule:.cascade) var lotsOfData :[LotsOfData]
init....
}
LotsOfData{
var element1 : String
var element2 : String
var element3 : String
var element4 : String
var element4 : String
init ….
}
LotsOfData has 100K instances in the database.
if I @Query into model1 because it references LotsOfData through A relationship is all that data all called / loaded ?
thanks for the information
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
From the Internet I read that URLRequest sends an Accept-Encoding header by default. I also read that URLSession auto decompresses any data that’s returned compressed. However these are what the internet says. I go to the Apple docs and read the URLSession & URLRequest sections but I can’t find where does it say that it sends the Accept-Encoding headers by default or that it auto decompresses compressed data. I know it does the latter as I am able to parse compressed data and have to do nothing to decompress. Just tell me where this stuff is documented by Apple so I can read about it.