-
Notifications
You must be signed in to change notification settings - Fork 388
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
Issue with Database Operations in Android Application #2522
Comments
What version of the Mobile SDK are you using? |
SDK v11.1.0
Any suggestions or recommendations would be helpful. |
Until SQLCipher 4.5.5 , SQLCipher for Android did not support concurrent database access. We have recently upgraded to that version in dev (it will be in Mobile SDK 12.0) but we have not yet relaxed concurrency in the SmartStore code itself. We plan to get to it but it will probably not be part of MSDK 12.0. When we do that, it should address the kind of challenges you have observed. |
Hi @wmathurin any update on concurrency relaxation SmartStore code please. Any suggestions we can implement as we have an application where we are struggling with performance. |
No concurrency relaxation SmartStore work was done for 12.0 and there is no target release for that work yet. |
@wmathurin |
Concurrency restrictions are preventing two threads from interacting with the same store at the same time, but there are no cross-stores restrictions. So you could read or write from one while reading or writing to another. Of course that only helps, if the concurrent access you require goes to different tables. |
Proposed Solutions: Concurrent Database Access: Given that SQLCipher for Android now supports concurrent access, I’m eager to know when we can expect the SmartStore code to support this. Multiple Stores: If partitioning soups into multiple stores can enhance concurrency, could you provide guidance or examples on implementing this effectively? |
Hi Team,
We are encountering a challenge with database operations in our Android application.
In our application, we utilize the following pseudocode logic for performing database queries:
val queryString = "SELECT {Example__c:_soup} …….”
store.query(QuerySpec.buildSmartQuerySpec(queryString, 10_000), 0)
We have observed that when executing complex queries on one screen and subsequently navigating to another screen where a similar query for the same database table Example__c is triggered, there is a noticeable delay in executing the latest query.
Our suspicion is that the database table Example__c may be locked, causing the new operation to be executed only after the completion of the previous one.
In light of this, we are seeking your expertise to provide suggestions or guidance on how we can potentially address this issue. Specifically, we would like to explore the possibility of canceling the existing table query operation before initiating a new one.
We would greatly appreciate any insights or recommendations you can provide to help us resolve this matter efficiently.
Also we have observed that, in comparison to iOS, SyncDown operations in our Android application are taking longer to complete. Our implementation follows the architecture outlined in the SalesforceMobileSDK-Templates repository: https://github.com/forcedotcom/SalesforceMobileSDK-Templates/tree/dev/MobileSyncExplorerKotlinTemplate
Could you suggest if there is a more efficient approach to implement SyncDown operations in Android?
The text was updated successfully, but these errors were encountered: