Is livequery performed after adding every new document?
I have a db with a million records:
It's somehow annoying because line A (check below) is called million times 
after updating just a single record:


liveQuery.addChangeListener(new LiveQuery.ChangeListener() {
                public void changed(final LiveQuery.ChangeEvent event) {
                    int c=0;
                    for (Iterator<QueryRow> it = event.getRows(); 
it.hasNext(); ) {
                        c++;
// LINE A
                        Log.d("SSS", String.valueOf(c));
                        final QueryRow row = it.next();
                        SavedRevision currentRevision = 
row.getDocument().getCurrentRevision();
                        activity.runOnUiThread(new Runnable() {

                            @Override
                            public void run() {
                                liveQueryEvent.newRowDroppedFromSky(row);
                            }
                        });

                    }
                }
            });

-- 
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/5a498b40-6ccf-4499-974c-0d80d371be54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to