Gabi
Gabi

Reputation: 21

CloudKit. Slow connection to Container Database first time

My question is about cloudkit and the delay I have when I run a CKQueryOperation to fetch records from the public database.

I have had a lot of tests and, definitely, this only happens when I run for the first time or when I haven´t use the app for a long time. In that situation, when I run the query I have to wait for several seconds before getting records. But if I repeat the request a couple of seconds later (or if I cancel the firts one and launch it again), then everything is fast and perfect.

Does cloudkit have any "cache" for queries already launched so the next time (in a short term) is faster? or is there anything about establishing the connection the first time and later this connection keeps alive?

I really have tried a lot of things and the result is always the same.

Please, do you have any clue about this behaviour?

Upvotes: 2

Views: 108

Answers (0)

Related Questions