Does "runAsync" respect "limit=1" ?? El martes, 19 de agosto de 2014 12:54:29 UTC-5, Frederic Yesid Peña Sánchez escribió: > > > > El martes, 19 de agosto de 2014 12:24:32 UTC-5, Jens Alfke escribió: >> >> >> On Aug 19, 2014, at 10:14 AM, Frederic Yesid Peña Sánchez < >> [email protected]> wrote: >> >> 1. We are attempting a "pre-loading" of views, so the user logs-in, the >> app syncs all data and query all the default views (may be not to pretty, >> but allows to improve speed on the entire app). >> ¿Is there a way to "clean" memory after each query?. We are receaving a >> lot of memory warnings >> >> >> Sounds like you're issuing queries that return a lot of data. If all you >> want to do is update the view's index, and you don't need the query >> results, you can just use a query with limit=1 so that almost no data will >> be returned. >> > > I've limited al "preloading" queries to 1, but the memory keeps high and > memory pressure kills app > >> 2. When we sync the first time, an iPad mini (first gen) goes up in >> memory towards 240 MB before the app is being killed by "memory pressure", >> but this does not happen with iPad Mini Retina or iPad 3rd+ Gen (65MB top). >> >> >> Syncing itself doesn't use a lot of memory. But if you have live queries >> active, they'll keep triggering over and over during the initial sync as >> the pull replicator adds documents. And if these queries are returning a >> large number of rows, memory usage could get high. >> >> It'd be best to limit the number of rows to something reasonable. If >> you're driving a table view that can only show maybe 20 rows, you don't >> need to populate it with all 10,000 rows, for example. This does get more >> complex to code since you have to use paging. >> >> Another option is to not create the live queries on the first launch >> until the initial sync has completed. >> > > I don't enable LiveQueries until initial Sync, (in fact they only go live > on each page they are needed) so there is nothing to do with Live queries > forcing several updates. > > As i told you, the same app on a iPad Mini Retina ran perfect and under > 70M memory consumption... >
-- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/80b1adce-fff9-4454-af7c-fce67fd08961%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
