Android - Local Datastore slow

56 views
Skip to first unread message

Mattia Confalonieri

unread,
May 30, 2020, 11:11:08 AM5/30/20
to Back4App
HI, I am new on android dev (i am an ios dev), in android sdk query from local datastore il very very slow... much slow then network, is that normal?

I am Ising SDK version 1.24.1 and. this is my query, in ios that query work smooth 

fun getCocktailsFromLocaldatastore(silently : Boolean) {
    val query = ParseQuery.getQuery(Cocktails::class.java)
    query.fromPin("Cocktails")
    query.whereEqualTo("enabled", true)
    query.include("baseDrinks")
    query.include("glass")
    query.include("equipmentsList")
    query.include("ingredientsList")
    query.include("garnishList")
    query.include("author")
    query.setLimit(9999999)
    query.findInBackground { objects, error ->
        if (error != null || objects.count() == 0) {
            getCocktails(silently)
        } else{
            ParseObject.unpinAllInBackground("Cocktails", objects)
            getCocktails(true)
            saveGlobalCocktailsData(objects as MutableList<Cocktails>)
        }
    }
}


ali öksüz

unread,
May 31, 2020, 2:22:21 AM5/31/20
to Back4App
Local parse database is slow. And it's normal. Local database is not suitable for large scale databases and nested objects. İf you want fast local database, i recommend you to use SQL database like Room
Reply all
Reply to author
Forward
0 new messages