Calling map for sequence

42 views
Skip to first unread message

Tobin Harris

unread,
Nov 12, 2012, 7:39:56 PM11/12/12
to mobile-c...@googlegroups.com
I have a single doc with about 8 revisions. Every time the index rebuilds, I get this in the log

00:33:26.346| View:   call map for sequence=8108...
....insert 6800 more log entries here....

00:33:42.718| View:   call map for sequence=15001...

My understanding of sequences isn't quite there yet, any pointers? This seems quite expensive for building a view with one document.

T

Jens Alfke

unread,
Nov 12, 2012, 8:34:23 PM11/12/12
to mobile-c...@googlegroups.com
Something’s not right. The map function only gets called for current/leaf non-deleted revisions, and only for ones added since the last time the view was queried (unless you alter the version string associated with the registered map function.)

One thing you can try is logging the document contents from in your map block.
Or is it possible you could send me a copy of the database file?

—Jens

Tobin Harris

unread,
Nov 13, 2012, 9:28:49 AM11/13/12
to mobile-c...@googlegroups.com
Could it be I'm using 0.961, the last Podspec version?

I'll see if I can get some data over.

T

Jens Alfke

unread,
Nov 13, 2012, 12:20:10 PM11/13/12
to mobile-c...@googlegroups.com

On Nov 13, 2012, at 6:28 AM, Tobin Harris <to...@engineroomapps.com> wrote:

Could it be I'm using 0.961, the last Podspec version?

Maybe. In general, if you’re not using a current release it’s a good idea to mention that up front.
In any case, please file a bug report.

—Jens

Frederic Yesid Peña Sánchez

unread,
Feb 17, 2014, 9:20:47 AM2/17/14
to mobile-c...@googlegroups.com
I'm looking for something particular and wished to know if it is normal:

I have two views, A & B.

When i query for view A, after the 1st run, stops logging about "call map for sequence=xxx", which in my beliefs is normal and my app loads the view controller really fast

But there is my view B, that keeps logging me "call map for sequence" every time is queried, noticing my app slows down here.

Should i look for something else?

PS. i have +LogCBLDatabase +LogView

Jens Alfke

unread,
Feb 17, 2014, 12:30:00 PM2/17/14
to mobile-c...@googlegroups.com

On Feb 17, 2014, at 6:20 AM, Frederic Yesid Peña Sánchez <freder...@gmail.com> wrote:

But there is my view B, that keeps logging me "call map for sequence" every time is queried, noticing my app slows down here.

It shouldn't be doing that — the view should only be calling the map function on documents that were updated since the last query. Are you sure there are no changes being made to the database in between queries?

Could you file an issue, please, including the log output? You don't need to include the entire log, just enough to show two view queries.

—Jens

Frederic Yesid Peña Sánchez

unread,
Feb 17, 2014, 12:44:13 PM2/17/14
to mobile-c...@googlegroups.com

Hi.

Well i'm currently cleaning up a mess where the view map is being re-defined with different version string.

Ill keep you posted...

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/GxBbdZohn5A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/DCDD64DD-343B-450E-A253-78A1B5D7E9A1%40couchbase.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages