Originally created by @SlinToWin on GitHub (Nov 15, 2017).
Use Case:
One Site in my App has two Data Models, one with many entries, one with a few.
When issuing a fetch on both of them on start, the heavy fetch blocks the small fetch because all transactions on CoreStore is done in a serial background queue.
Is there a way to concurrent fetch Data from Core Store asynchronous?
Originally created by @SlinToWin on GitHub (Nov 15, 2017).
Use Case:
One Site in my App has two Data Models, one with many entries, one with a few.
When issuing a fetch on both of them on start, the heavy fetch blocks the small fetch because all transactions on CoreStore is done in a serial background queue.
Is there a way to concurrent fetch Data from Core Store asynchronous?
Just to clarify, your two fetches are both from inside transactions, correct?
If your two data models are unrelated to each other, I recommend separating their DataStack (and files). This way each model will have their own serial transactions.
The safety of CoreStore's transactions lie on the serial execution. If you wish to bypass this safety you can use a unsafe transactions (dataStack.beginUnsafe()) you can use freely on any queue. At that point, you are on your own with thread management.
@JohnEstropia commented on GitHub (Nov 21, 2017):
Just to clarify, your two fetches are both from inside transactions, correct?
If your two data models are unrelated to each other, I recommend separating their DataStack (and files). This way each model will have their own serial transactions.
The safety of CoreStore's transactions lie on the serial execution. If you wish to bypass this safety you can use a unsafe transactions (`dataStack.beginUnsafe()`) you can use freely on any queue. At that point, you are on your own with thread management.
Yeah this is correct.
My thought was only some sort of concurrent read access, but sure there must be some sync managment. I have worked around that issue so i close this one. Thanks for your help.
@SlinToWin commented on GitHub (Dec 9, 2017):
Yeah this is correct.
My thought was only some sort of concurrent read access, but sure there must be some sync managment. I have worked around that issue so i close this one. Thanks for your help.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @SlinToWin on GitHub (Nov 15, 2017).
Use Case:
One Site in my App has two Data Models, one with many entries, one with a few.
When issuing a fetch on both of them on start, the heavy fetch blocks the small fetch because all transactions on CoreStore is done in a serial background queue.
Is there a way to concurrent fetch Data from Core Store asynchronous?
@JohnEstropia commented on GitHub (Nov 21, 2017):
Just to clarify, your two fetches are both from inside transactions, correct?
If your two data models are unrelated to each other, I recommend separating their DataStack (and files). This way each model will have their own serial transactions.
The safety of CoreStore's transactions lie on the serial execution. If you wish to bypass this safety you can use a unsafe transactions (
dataStack.beginUnsafe()) you can use freely on any queue. At that point, you are on your own with thread management.@SlinToWin commented on GitHub (Dec 9, 2017):
Yeah this is correct.
My thought was only some sort of concurrent read access, but sure there must be some sync managment. I have worked around that issue so i close this one. Thanks for your help.