Synchonizing 600 records from CloudKit blocks app

I followed CloudKitDemo project in my app (to remove duplicates) and syncing 600 simple records takes quite a lot of time and block completely application UI. What I am doing wrong ?
Synchonizing 600 records from CloudKit blocks app
 
 
Q