Android room database - LiveData paging slow appear when a lot of insert/update into database
See original GitHub issueI’m working in a project realtime with LiveData and Paging database I meet the issue: – My list take long time to appear when have a lot of insert/update to database.
val viewModel = ViewModelProviders.of(this).get(MyViewModel::class.java) viewModel.init(database) viewModel.getUserList()?.observe(this, Observer { println("load paging :::: ${it?.size}") })
could anybody help me
Thank you so much. Hieu Tran
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:20 (2 by maintainers)
Top Results From Across the Web
LiveData paging slow appear when a lot of insert/update ...
I use LiveData to my project without room, I find when I change database the ui update very slow. It's there a good...
Read more >Lag in displaying data from Oberver on LiveData
Adapter, and loads data from LiveData from my Room database. The problem is that my display is always blank, and checking with the...
Read more >Write asynchronous DAO queries
DAO queries fall into three categories: One-shot write queries that insert, update, or delete data in the database. One-shot read queries that ...
Read more >7 Pro-tips for Room
In this article, I'd like to share some pro-tips on getting the most out of Room: Pre-populate your database via RoomDatabase#Callback ...
Read more >Exception while computing database live data - Visible to Public
P2, Android room database - LiveData paging slow appear when a lot of insert/update into database. “ https://issuetracker.google.com/134685570 ”.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tvhieuit Currently I’m working on a demo with Paging lib + Room + LiveData, I trigger updates and try to debug and see what’s going on. The result is Room only loads specific number of items follow what I’ve config with Paging lib (ex : page size) instead of re-create the whole query
I think that Room (+LiveData) will re-query for every updates so it’s causing slow when have a lot of insert/update