-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow DB Performance - DataStack childTransactionQueue, qos: .utility #490
Comments
Asynchronous transactions are executed in a serial queue, so what you're seeing is expected behavior. This ensures that operations within each transaction block do not cause the transactions to conflict with each other. If you are very sure that your updates will not affect other transactions, feel free to use the |
Thank you for the fast reply. I've tried the Any idea why? |
Is it possible that your app has too many queues have high priority? That will tend to starve lower priority queues. Note that |
Looks like i figured it out. |
Hi,
I'm building an app that is very db heavy.
I've noticed my inserts using dataStack.perform(asynchronous(()) are slow.
I was able to have double the insert performance by changing DataStack childTransactionQueue QOS to .userInitiated from .utility
(internal let childTransactionQueue = DispatchQueue.serial("com.coreStore.dataStack.childTransactionQueue", qos: .userInitiated))
Is there a reason for that queue to have lower priority? Is there a faster way to populate the database?
The text was updated successfully, but these errors were encountered: