> On Jan 27, 2015, at 10:35 AM, Julio Albuquerque > <[email protected]> wrote: > > This time (30 seconds) is being spent in the code below:
Oh, I see. When you wrote “From here it takes 30 seconds” I thought you meant from the qry.Run() call to the next line. I can’t tell from the loop what would make it that slow. As I said last time, you should profile the code. A couple of points on the code: * You’re calling line.Document over and over again. DRY! You should get the document once and store it in a variable. * When you design a view you should emit the document properties you need as values. If you dereference the document from a query row, it causes another database lookup to load the document. So your map function should be emitting properties like “nome”, “razao”, etc. —Jens -- 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/D491D41E-7D0F-4517-A38D-4CECDD508DA7%40mooseyard.com. For more options, visit https://groups.google.com/d/optout.
