Skip to content
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

Shouldn't run Realm transactions/queries on the UI thread #256

Open
am-MongoDB opened this issue Sep 1, 2020 · 6 comments
Open

Shouldn't run Realm transactions/queries on the UI thread #256

am-MongoDB opened this issue Sep 1, 2020 · 6 comments
Labels
Architecture Architectural changes/refactoring days: 2 Estimated to take 2 days to implement desirable: Community enhancement New feature or request

Comments

@am-MongoDB
Copy link
Collaborator

From review by Realm engineering team:

RealmDataSource run transactions and queries on the UI thread. This could potentially block the UI, and is bad practise when using Sync.

@am-MongoDB am-MongoDB added the enhancement New feature or request label Sep 1, 2020
@am-MongoDB am-MongoDB added this to the Demo v26 9/8 milestone Sep 1, 2020
@Sheeri
Copy link
Collaborator

Sheeri commented Sep 1, 2020

@am-MongoDB where should the transactions and queries run?

@am-MongoDB
Copy link
Collaborator Author

They should be run in a worker thread

@lebedynskyi
Copy link
Contributor

@Sheeri @am-MongoDB
On Android we use Kotlin. We can easely start using Coroutines.. Are you agree with it?

@am-MongoDB
Copy link
Collaborator Author

If coroutines are the correct way to ensure that slow operations don't block the UI, then yes, let's use them

@lebedynskyi lebedynskyi self-assigned this Sep 9, 2020
@Sheeri Sheeri modified the milestones: Demo v26 9/8, Demo v27 9/15 Sep 9, 2020
@am-MongoDB am-MongoDB added Architecture Architectural changes/refactoring days: 2 Estimated to take 2 days to implement desirable: Community labels Sep 15, 2020
@Sheeri
Copy link
Collaborator

Sheeri commented Sep 15, 2020

@lebedynskyi I am also OK with coroutines. Does that unblock this ticket?

@Sheeri Sheeri modified the milestones: Demo v27 9/15, Demo v29 9/29 Sep 15, 2020
@lebedynskyi
Copy link
Contributor

lebedynskyi commented Sep 15, 2020

@Sheeri in General no. We are waiting for native support of Realm SDK

@Sheeri Sheeri removed this from the Demo v29 9/29 milestone Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Architectural changes/refactoring days: 2 Estimated to take 2 days to implement desirable: Community enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants