Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion In which I ask your help designing Motor's cursor API
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Shane Spencer  
View profile  
 More options Nov 13 2012, 10:04 pm
From: Shane Spencer <sh...@bogomip.com>
Date: Tue, 13 Nov 2012 18:04:19 -0900
Local: Tues, Nov 13 2012 10:04 pm
Subject: Re: [tornado] In which I ask your help designing Motor's cursor API
I actually ended up clarifying myself a bit right after I questioned
my sanity to you.  It's more of a question about find_next (returns 1
item) and find_next_batch(10) (returns 10 items, keeping code clean).
If you missed that message please read it.

On Tue, Nov 13, 2012 at 12:30 PM, A. Jesse Jiryu Davis

<je...@emptysquare.net> wrote:
> Not loco, Shane. You can control batch size before you start iterating:

> http://emptysquare.net/motor/pymongo/api/motor/motor_cursor.html#moto...

> ... if you don't set an explicit batch size, then the first batch will be
> about 101 documents, subsequent batches as large as Mongo will give you.
> Does that do what you want? To reiterate: Neither Ben nor I is proposing to
> do I/O on every iteration of the loop! We're just talking about the right
> API to give the caller the illusion of a continuous stream of documents,
> while occasionally fetching them in batches.

> On Tuesday, November 13, 2012 3:16:25 PM UTC-6, Shane Spencer wrote:

>> All broken records aside.. would it be worthwhile at all to have a
>> fetch_next_bulk(limit=n) while this is happening?  It's a mixture of
>> stream processing and flattened list processing.  I shall never speak
>> of it again if the answer is I'm loco.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.