mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
App freezes till completion block gets called. #212
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @praveen-b27 on GitHub (May 14, 2018).
Below is the piece of code I'm using to store the products details, I will be getting huge data which has more than 7000 products.
Kindly let me know why the UI is getting blocked when it get stored.
@JohnEstropia commented on GitHub (May 14, 2018):
First, you don't need to dispatch the
peform(asynchronous:)call fromDispatchQueue.global(). CoreStore will manage this for you.As for the blocking UI thread issue, do you have anywhere in your code where you are using
perform(synchronous:)?@praveen-b27 commented on GitHub (May 14, 2018):
No, I used only perform(asynchronous) for all the corestore calls.
@JohnEstropia commented on GitHub (Jun 10, 2018):
Have you resolved this issue? Note that ListMonitors and other observers will be notified right after commit, which would be just before the
completionclosure is called. It's possible you have an observer somewhere that is taking a long time and is blocking the UI thread.@praveen-b27 commented on GitHub (Jun 11, 2018):
I'm not using any List Monitors or observers to notify UI, waiting til the completion calls and trying to update my UI. But my app freezes few seconds until completion block gets called. This is happening all the time.
@leacode commented on GitHub (Sep 19, 2019):
Get the same issue here. Just called CoreStore.perform(asynchronous: ... ) to update some value. No other observer exist. The app freeze and never enter completion block.
@leacode commented on GitHub (Sep 19, 2019):
Problem solved.
First, do not call several update at the same time.
Second, do not use try? or try!, I read it from the readme file.
@iosDeveloperAyaz commented on GitHub (Feb 13, 2022):
I am facing same issue, App Freeze until and unless, completion not called. I called right before loader but it is also called after completion , even I can interact with app.