You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Alexander Gabriel <al...@barbalex.ch> on 2013/03/04 00:54:18 UTC

view crashes chrome

I have this view :
function(doc) {
if (doc.Gruppe && doc.Gruppe === "Flora" && doc.Typ && doc.Typ ===
"Objekt") {
 emit ([doc._id, doc._rev]);
}
}

It fetches 7900 documents with about 65 MB.

When I call it (from javascript) without the all_docs option, it runs o.k.
With the all_docs option it crashes Chrome but not Firefox (both newest
versions).

I've isolated the crash to this line of code:
$db.view('artendb/flora?include_docs=true"});

I'v created a view that directly fetches all docs:
function(doc) {
if (doc.Gruppe && doc.Gruppe === "Flora" && doc.Typ && doc.Typ ===
"Objekt") {
emit ([doc._id, doc._rev], doc);
}
}
It runs without problems in futon.

I've tested a bunch of the documents contained in the view on
http://jsonlint.com and they were all o.k.

Is there a way to lint the entire 65 MB of data?
What else could cause the crash in chrome?
What would you do to crush this bug?

Re: view crashes chrome

Posted by "Kevin R. Coombes" <ke...@gmail.com>.
Do you need all the data at once, or can you get it in pieces?  Is it 
enough to get 100 documents at a time? or 500?  If so, you can limit the 
number of documents and iterate through a loop to get them in batches.

On 3/4/2013 8:38 AM, Alexander Gabriel wrote:
> using 'limit' would limit what I get, right?
> Trouble is: I need all the data.
> Am I fetching too much data? What would limit the amount of data the view
> can fetch?
>
>
>
>
> ***********************************************************
>
>
>
> Alexander Gabriel
> Wiesenstrasse 22
> 8800 Thalwil
> 079/ 372 51 64
> alex@barbalex.ch
> www.barbalex.ch
>
>
>
> 2013/3/4 Kevin R. Coombes<ke...@gmail.com>
>
>> Actually, you are probably better off use "startkey" and "limit" rather
>> than "skip".
>>
>>
>> On 3/4/2013 12:11 AM, Anthony Ananich wrote:
>>
>>> You probably need to use 'skip' and 'limit'
>>> http://wiki.apache.org/**couchdb/HTTP_view_API#**Querying_Options<http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options>
>>>
>>> On Mon, Mar 4, 2013 at 2:54 AM, Alexander Gabriel<al...@barbalex.ch>
>>>   wrote:
>>>
>>>> I have this view :
>>>> function(doc) {
>>>> if (doc.Gruppe&&   doc.Gruppe === "Flora"&&   doc.Typ&&   doc.Typ ===
>>>>
>>>> "Objekt") {
>>>>    emit ([doc._id, doc._rev]);
>>>> }
>>>> }
>>>>
>>>> It fetches 7900 documents with about 65 MB.
>>>>
>>>> When I call it (from javascript) without the all_docs option, it runs
>>>> o.k.
>>>> With the all_docs option it crashes Chrome but not Firefox (both newest
>>>> versions).
>>>>
>>>> I've isolated the crash to this line of code:
>>>> $db.view('artendb/flora?**include_docs=true"});
>>>>
>>>> I'v created a view that directly fetches all docs:
>>>> function(doc) {
>>>> if (doc.Gruppe&&   doc.Gruppe === "Flora"&&   doc.Typ&&   doc.Typ ===
>>>>
>>>> "Objekt") {
>>>> emit ([doc._id, doc._rev], doc);
>>>> }
>>>> }
>>>> It runs without problems in futon.
>>>>
>>>> I've tested a bunch of the documents contained in the view on
>>>> http://jsonlint.com and they were all o.k.
>>>>
>>>> Is there a way to lint the entire 65 MB of data?
>>>> What else could cause the crash in chrome?
>>>> What would you do to crush this bug?
>>>>

Re: view crashes chrome

Posted by Keith Gable <zi...@ignition-project.com>.
On Tue, Mar 5, 2013 at 12:22 PM, Jens Alfke <je...@couchbase.com> wrote:
>
> You’re right; it looks like Chrome hasn’t migrated to 64-bit yet on Mac either. I wonder why not?
>

http://i.qkme.me/3t9dov.jpg

:)

Re: view crashes chrome

Posted by Jens Alfke <je...@couchbase.com>.
On Mar 5, 2013, at 8:22 AM, Alexander Gabriel <al...@barbalex.ch> wrote:

> I think my Chrome is 32bit. Not sure if 64bit exists?

You’re right; it looks like Chrome hasn’t migrated to 64-bit yet on Mac either. I wonder why not?

> @Jens: Where would the crash be logged? I looked in the windows
> "ereignisanzeige" (probably "event viewer" in english) and nothing seems to
> have been noted there.

Sorry, I don’t use Windows so I have no idea how it logs crashes.

In any case, it does sound like the best solution is to try to load less data at once into the browser.

—Jens


Re: view crashes chrome

Posted by Alexander Gabriel <al...@barbalex.ch>.
just a short notice to let you know that I implemented your inputs and it
works like a charm




2013/3/6 Robert Newson <rn...@apache.org>

> the javascript test suite might contain examples of this btw.
>
> On 6 March 2013 16:12, Robert Newson <rn...@apache.org> wrote:
> > You should have access to all url parameters in that object iirc.
> >
> > On 6 March 2013 16:06, Alexander Gabriel <al...@barbalex.ch> wrote:
> >> sorry. Passed parameters are in req.query and I guess it's clear passing
> >> via url is the only way possible
> >>
> >>
> >>
> >>
> >> ***********************************************************
> >>
> >>
> >>
> >> Alexander Gabriel
> >> Wiesenstrasse 22
> >> 8800 Thalwil
> >> 079/ 372 51 64
> >> alex@barbalex.ch
> >> www.barbalex.ch
> >>
> >>
> >>
> >> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
> >>
> >>> o.k., I found it in req.info.query
> >>> is passing via url and accessing here the way to go?
> >>>
> >>>
> >>>
> >>>
> >>> ***********************************************************
> >>>
> >>>
> >>>
> >>> Alexander Gabriel
> >>> Wiesenstrasse 22
> >>> 8800 Thalwil
> >>> 079/ 372 51 64
> >>> alex@barbalex.ch
> >>> www.barbalex.ch
> >>>
> >>>
> >>>
> >>> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
> >>>
> >>>> O.k., returning the list of fields works like a charm.
> >>>>
> >>>> But how can I pass parameters to the list function?
> >>>>
> >>>> I need to pass filter criteria that cannot be planned ahead, so
> filtering
> >>>> in the view is no option.
> >>>>
> >>>> Can the querystring be accessed from the list function? I've read it
> can
> >>>> be over the req argument. Bot how?
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> ***********************************************************
> >>>>
> >>>>
> >>>>
> >>>> Alexander Gabriel
> >>>> Wiesenstrasse 22
> >>>> 8800 Thalwil
> >>>> 079/ 372 51 64
> >>>> alex@barbalex.ch
> >>>> www.barbalex.ch
> >>>>
> >>>>
> >>>>
> >>>> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
> >>>>
> >>>>> phew. What great help!
> >>>>>
> >>>>> O.k., so basically I do all I did in memory on the server inside the
> >>>>> list function. I'm not used to list functions (which is kind of
> obvious by
> >>>>> no I'm afraid), so I'll get my head down and work on this. But it
> does
> >>>>> sound as if it should work.
> >>>>>
> >>>>> Guys: You've earned a beer. Unless someone of you passes by Zürich in
> >>>>> Switzerland I'm afraid a virtual one will have to do... (and if so:
> do
> >>>>> contact me!)
> >>>>>
> >>>>> Thanks a lot!
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> ***********************************************************
> >>>>>
> >>>>>
> >>>>>
> >>>>> Alexander Gabriel
> >>>>> Wiesenstrasse 22
> >>>>> 8800 Thalwil
> >>>>> 079/ 372 51 64
> >>>>> alex@barbalex.ch
> >>>>> www.barbalex.ch
> >>>>>
> >>>>>
> >>>>>
> >>>>> 2013/3/6 Matthieu Rakotojaona <ma...@gmail.com>
> >>>>>
> >>>>>> On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel <alex@barbalex.ch
> >
> >>>>>> wrote:
> >>>>>> > Seems like this really is a Chrome issue and has nothing to do
> with
> >>>>>> > CouchDb.
> >>>>>>
> >>>>>> I think downloading the whole documents for each processing is a bad
> >>>>>> idea, whatever the browser. You should try to better think your
> views;
> >>>>>> Here are some simple thoughts on how to do it.
> >>>>>>
> >>>>>> Basically, you have a document with multiple fields. I'll take [0]
> as
> >>>>>> an example doc and build upon it.
> >>>>>>
> >>>>>> (I have a question first: Why do you have 3 similar structures (I'm
> >>>>>> talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user
> >>>>>> wants a document, do you consider each of those as being different,
> or
> >>>>>> should the 3 be merged and seen as 1 document in the output ?)
> >>>>>>
> >>>>>> The view you will need will look like this:
> >>>>>>
> >>>>>> for each doc:
> >>>>>>    for each unitary output doc:  -> if the 3 docs are counted as 3
> >>>>>> different ones
> >>>>>>       for each field in Felder:
> >>>>>>            emit(field, null)
> >>>>>>
> >>>>>> This will give you a huge list of all the fields available for each
> >>>>>> document. You will then retrieve it from the client; use a reduce
> >>>>>> function (like _count) to group the fields if they are similar.
> >>>>>>
> >>>>>> You now have a list of all possible fields on your client. You can
> >>>>>> build the filter panel with this (ie you know what fields you can
> >>>>>> filter from), and you can also prefill the export panel.
> >>>>>>
> >>>>>> Now, the user can select the fields he wants to use as a filtering.
> >>>>>> Don't send anything to the server yet ! Just build a list of all the
> >>>>>> fields you want to keep. In parallel, you can also build the list of
> >>>>>> fields you want to export in the appropriate panel.
> >>>>>>
> >>>>>> Next step is to use a _list function to retrieve the documents that
> >>>>>> have all the fields (and, if needed, transform to csv also in the
> >>>>>> _list function). This _list function would accept a filter_list and
> an
> >>>>>> export_list parameters, the first one being the fields a doc must
> have
> >>>>>> to be exported, and the second one the list of fields to be
> exported.
> >>>>>> You can then convert your documents and send them back to the
> client.
> >>>>>>
> >>>>>> [0]
> >>>>>>
> http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3
> >>>>>>
> >>>>>> --
> >>>>>> Matthieu RAKOTOJAONA
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
>

Re: view crashes chrome

Posted by Robert Newson <rn...@apache.org>.
the javascript test suite might contain examples of this btw.

On 6 March 2013 16:12, Robert Newson <rn...@apache.org> wrote:
> You should have access to all url parameters in that object iirc.
>
> On 6 March 2013 16:06, Alexander Gabriel <al...@barbalex.ch> wrote:
>> sorry. Passed parameters are in req.query and I guess it's clear passing
>> via url is the only way possible
>>
>>
>>
>>
>> ***********************************************************
>>
>>
>>
>> Alexander Gabriel
>> Wiesenstrasse 22
>> 8800 Thalwil
>> 079/ 372 51 64
>> alex@barbalex.ch
>> www.barbalex.ch
>>
>>
>>
>> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>>
>>> o.k., I found it in req.info.query
>>> is passing via url and accessing here the way to go?
>>>
>>>
>>>
>>>
>>> ***********************************************************
>>>
>>>
>>>
>>> Alexander Gabriel
>>> Wiesenstrasse 22
>>> 8800 Thalwil
>>> 079/ 372 51 64
>>> alex@barbalex.ch
>>> www.barbalex.ch
>>>
>>>
>>>
>>> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>>>
>>>> O.k., returning the list of fields works like a charm.
>>>>
>>>> But how can I pass parameters to the list function?
>>>>
>>>> I need to pass filter criteria that cannot be planned ahead, so filtering
>>>> in the view is no option.
>>>>
>>>> Can the querystring be accessed from the list function? I've read it can
>>>> be over the req argument. Bot how?
>>>>
>>>>
>>>>
>>>>
>>>> ***********************************************************
>>>>
>>>>
>>>>
>>>> Alexander Gabriel
>>>> Wiesenstrasse 22
>>>> 8800 Thalwil
>>>> 079/ 372 51 64
>>>> alex@barbalex.ch
>>>> www.barbalex.ch
>>>>
>>>>
>>>>
>>>> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>>>>
>>>>> phew. What great help!
>>>>>
>>>>> O.k., so basically I do all I did in memory on the server inside the
>>>>> list function. I'm not used to list functions (which is kind of obvious by
>>>>> no I'm afraid), so I'll get my head down and work on this. But it does
>>>>> sound as if it should work.
>>>>>
>>>>> Guys: You've earned a beer. Unless someone of you passes by Zürich in
>>>>> Switzerland I'm afraid a virtual one will have to do... (and if so: do
>>>>> contact me!)
>>>>>
>>>>> Thanks a lot!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ***********************************************************
>>>>>
>>>>>
>>>>>
>>>>> Alexander Gabriel
>>>>> Wiesenstrasse 22
>>>>> 8800 Thalwil
>>>>> 079/ 372 51 64
>>>>> alex@barbalex.ch
>>>>> www.barbalex.ch
>>>>>
>>>>>
>>>>>
>>>>> 2013/3/6 Matthieu Rakotojaona <ma...@gmail.com>
>>>>>
>>>>>> On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel <al...@barbalex.ch>
>>>>>> wrote:
>>>>>> > Seems like this really is a Chrome issue and has nothing to do with
>>>>>> > CouchDb.
>>>>>>
>>>>>> I think downloading the whole documents for each processing is a bad
>>>>>> idea, whatever the browser. You should try to better think your views;
>>>>>> Here are some simple thoughts on how to do it.
>>>>>>
>>>>>> Basically, you have a document with multiple fields. I'll take [0] as
>>>>>> an example doc and build upon it.
>>>>>>
>>>>>> (I have a question first: Why do you have 3 similar structures (I'm
>>>>>> talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user
>>>>>> wants a document, do you consider each of those as being different, or
>>>>>> should the 3 be merged and seen as 1 document in the output ?)
>>>>>>
>>>>>> The view you will need will look like this:
>>>>>>
>>>>>> for each doc:
>>>>>>    for each unitary output doc:  -> if the 3 docs are counted as 3
>>>>>> different ones
>>>>>>       for each field in Felder:
>>>>>>            emit(field, null)
>>>>>>
>>>>>> This will give you a huge list of all the fields available for each
>>>>>> document. You will then retrieve it from the client; use a reduce
>>>>>> function (like _count) to group the fields if they are similar.
>>>>>>
>>>>>> You now have a list of all possible fields on your client. You can
>>>>>> build the filter panel with this (ie you know what fields you can
>>>>>> filter from), and you can also prefill the export panel.
>>>>>>
>>>>>> Now, the user can select the fields he wants to use as a filtering.
>>>>>> Don't send anything to the server yet ! Just build a list of all the
>>>>>> fields you want to keep. In parallel, you can also build the list of
>>>>>> fields you want to export in the appropriate panel.
>>>>>>
>>>>>> Next step is to use a _list function to retrieve the documents that
>>>>>> have all the fields (and, if needed, transform to csv also in the
>>>>>> _list function). This _list function would accept a filter_list and an
>>>>>> export_list parameters, the first one being the fields a doc must have
>>>>>> to be exported, and the second one the list of fields to be exported.
>>>>>> You can then convert your documents and send them back to the client.
>>>>>>
>>>>>> [0]
>>>>>> http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3
>>>>>>
>>>>>> --
>>>>>> Matthieu RAKOTOJAONA
>>>>>>
>>>>>
>>>>>
>>>>
>>>

Re: view crashes chrome

Posted by Robert Newson <rn...@apache.org>.
You should have access to all url parameters in that object iirc.

On 6 March 2013 16:06, Alexander Gabriel <al...@barbalex.ch> wrote:
> sorry. Passed parameters are in req.query and I guess it's clear passing
> via url is the only way possible
>
>
>
>
> ***********************************************************
>
>
>
> Alexander Gabriel
> Wiesenstrasse 22
> 8800 Thalwil
> 079/ 372 51 64
> alex@barbalex.ch
> www.barbalex.ch
>
>
>
> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>
>> o.k., I found it in req.info.query
>> is passing via url and accessing here the way to go?
>>
>>
>>
>>
>> ***********************************************************
>>
>>
>>
>> Alexander Gabriel
>> Wiesenstrasse 22
>> 8800 Thalwil
>> 079/ 372 51 64
>> alex@barbalex.ch
>> www.barbalex.ch
>>
>>
>>
>> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>>
>>> O.k., returning the list of fields works like a charm.
>>>
>>> But how can I pass parameters to the list function?
>>>
>>> I need to pass filter criteria that cannot be planned ahead, so filtering
>>> in the view is no option.
>>>
>>> Can the querystring be accessed from the list function? I've read it can
>>> be over the req argument. Bot how?
>>>
>>>
>>>
>>>
>>> ***********************************************************
>>>
>>>
>>>
>>> Alexander Gabriel
>>> Wiesenstrasse 22
>>> 8800 Thalwil
>>> 079/ 372 51 64
>>> alex@barbalex.ch
>>> www.barbalex.ch
>>>
>>>
>>>
>>> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>>>
>>>> phew. What great help!
>>>>
>>>> O.k., so basically I do all I did in memory on the server inside the
>>>> list function. I'm not used to list functions (which is kind of obvious by
>>>> no I'm afraid), so I'll get my head down and work on this. But it does
>>>> sound as if it should work.
>>>>
>>>> Guys: You've earned a beer. Unless someone of you passes by Zürich in
>>>> Switzerland I'm afraid a virtual one will have to do... (and if so: do
>>>> contact me!)
>>>>
>>>> Thanks a lot!
>>>>
>>>>
>>>>
>>>>
>>>> ***********************************************************
>>>>
>>>>
>>>>
>>>> Alexander Gabriel
>>>> Wiesenstrasse 22
>>>> 8800 Thalwil
>>>> 079/ 372 51 64
>>>> alex@barbalex.ch
>>>> www.barbalex.ch
>>>>
>>>>
>>>>
>>>> 2013/3/6 Matthieu Rakotojaona <ma...@gmail.com>
>>>>
>>>>> On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel <al...@barbalex.ch>
>>>>> wrote:
>>>>> > Seems like this really is a Chrome issue and has nothing to do with
>>>>> > CouchDb.
>>>>>
>>>>> I think downloading the whole documents for each processing is a bad
>>>>> idea, whatever the browser. You should try to better think your views;
>>>>> Here are some simple thoughts on how to do it.
>>>>>
>>>>> Basically, you have a document with multiple fields. I'll take [0] as
>>>>> an example doc and build upon it.
>>>>>
>>>>> (I have a question first: Why do you have 3 similar structures (I'm
>>>>> talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user
>>>>> wants a document, do you consider each of those as being different, or
>>>>> should the 3 be merged and seen as 1 document in the output ?)
>>>>>
>>>>> The view you will need will look like this:
>>>>>
>>>>> for each doc:
>>>>>    for each unitary output doc:  -> if the 3 docs are counted as 3
>>>>> different ones
>>>>>       for each field in Felder:
>>>>>            emit(field, null)
>>>>>
>>>>> This will give you a huge list of all the fields available for each
>>>>> document. You will then retrieve it from the client; use a reduce
>>>>> function (like _count) to group the fields if they are similar.
>>>>>
>>>>> You now have a list of all possible fields on your client. You can
>>>>> build the filter panel with this (ie you know what fields you can
>>>>> filter from), and you can also prefill the export panel.
>>>>>
>>>>> Now, the user can select the fields he wants to use as a filtering.
>>>>> Don't send anything to the server yet ! Just build a list of all the
>>>>> fields you want to keep. In parallel, you can also build the list of
>>>>> fields you want to export in the appropriate panel.
>>>>>
>>>>> Next step is to use a _list function to retrieve the documents that
>>>>> have all the fields (and, if needed, transform to csv also in the
>>>>> _list function). This _list function would accept a filter_list and an
>>>>> export_list parameters, the first one being the fields a doc must have
>>>>> to be exported, and the second one the list of fields to be exported.
>>>>> You can then convert your documents and send them back to the client.
>>>>>
>>>>> [0]
>>>>> http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3
>>>>>
>>>>> --
>>>>> Matthieu RAKOTOJAONA
>>>>>
>>>>
>>>>
>>>
>>

Re: view crashes chrome

Posted by Alexander Gabriel <al...@barbalex.ch>.
sorry. Passed parameters are in req.query and I guess it's clear passing
via url is the only way possible




***********************************************************



Alexander Gabriel
Wiesenstrasse 22
8800 Thalwil
079/ 372 51 64
alex@barbalex.ch
www.barbalex.ch



2013/3/6 Alexander Gabriel <al...@barbalex.ch>

> o.k., I found it in req.info.query
> is passing via url and accessing here the way to go?
>
>
>
>
> ***********************************************************
>
>
>
> Alexander Gabriel
> Wiesenstrasse 22
> 8800 Thalwil
> 079/ 372 51 64
> alex@barbalex.ch
> www.barbalex.ch
>
>
>
> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>
>> O.k., returning the list of fields works like a charm.
>>
>> But how can I pass parameters to the list function?
>>
>> I need to pass filter criteria that cannot be planned ahead, so filtering
>> in the view is no option.
>>
>> Can the querystring be accessed from the list function? I've read it can
>> be over the req argument. Bot how?
>>
>>
>>
>>
>> ***********************************************************
>>
>>
>>
>> Alexander Gabriel
>> Wiesenstrasse 22
>> 8800 Thalwil
>> 079/ 372 51 64
>> alex@barbalex.ch
>> www.barbalex.ch
>>
>>
>>
>> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>>
>>> phew. What great help!
>>>
>>> O.k., so basically I do all I did in memory on the server inside the
>>> list function. I'm not used to list functions (which is kind of obvious by
>>> no I'm afraid), so I'll get my head down and work on this. But it does
>>> sound as if it should work.
>>>
>>> Guys: You've earned a beer. Unless someone of you passes by Zürich in
>>> Switzerland I'm afraid a virtual one will have to do... (and if so: do
>>> contact me!)
>>>
>>> Thanks a lot!
>>>
>>>
>>>
>>>
>>> ***********************************************************
>>>
>>>
>>>
>>> Alexander Gabriel
>>> Wiesenstrasse 22
>>> 8800 Thalwil
>>> 079/ 372 51 64
>>> alex@barbalex.ch
>>> www.barbalex.ch
>>>
>>>
>>>
>>> 2013/3/6 Matthieu Rakotojaona <ma...@gmail.com>
>>>
>>>> On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel <al...@barbalex.ch>
>>>> wrote:
>>>> > Seems like this really is a Chrome issue and has nothing to do with
>>>> > CouchDb.
>>>>
>>>> I think downloading the whole documents for each processing is a bad
>>>> idea, whatever the browser. You should try to better think your views;
>>>> Here are some simple thoughts on how to do it.
>>>>
>>>> Basically, you have a document with multiple fields. I'll take [0] as
>>>> an example doc and build upon it.
>>>>
>>>> (I have a question first: Why do you have 3 similar structures (I'm
>>>> talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user
>>>> wants a document, do you consider each of those as being different, or
>>>> should the 3 be merged and seen as 1 document in the output ?)
>>>>
>>>> The view you will need will look like this:
>>>>
>>>> for each doc:
>>>>    for each unitary output doc:  -> if the 3 docs are counted as 3
>>>> different ones
>>>>       for each field in Felder:
>>>>            emit(field, null)
>>>>
>>>> This will give you a huge list of all the fields available for each
>>>> document. You will then retrieve it from the client; use a reduce
>>>> function (like _count) to group the fields if they are similar.
>>>>
>>>> You now have a list of all possible fields on your client. You can
>>>> build the filter panel with this (ie you know what fields you can
>>>> filter from), and you can also prefill the export panel.
>>>>
>>>> Now, the user can select the fields he wants to use as a filtering.
>>>> Don't send anything to the server yet ! Just build a list of all the
>>>> fields you want to keep. In parallel, you can also build the list of
>>>> fields you want to export in the appropriate panel.
>>>>
>>>> Next step is to use a _list function to retrieve the documents that
>>>> have all the fields (and, if needed, transform to csv also in the
>>>> _list function). This _list function would accept a filter_list and an
>>>> export_list parameters, the first one being the fields a doc must have
>>>> to be exported, and the second one the list of fields to be exported.
>>>> You can then convert your documents and send them back to the client.
>>>>
>>>> [0]
>>>> http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3
>>>>
>>>> --
>>>> Matthieu RAKOTOJAONA
>>>>
>>>
>>>
>>
>

Re: view crashes chrome

Posted by Alexander Gabriel <al...@barbalex.ch>.
o.k., I found it in req.info.query
is passing via url and accessing here the way to go?




***********************************************************



Alexander Gabriel
Wiesenstrasse 22
8800 Thalwil
079/ 372 51 64
alex@barbalex.ch
www.barbalex.ch



2013/3/6 Alexander Gabriel <al...@barbalex.ch>

> O.k., returning the list of fields works like a charm.
>
> But how can I pass parameters to the list function?
>
> I need to pass filter criteria that cannot be planned ahead, so filtering
> in the view is no option.
>
> Can the querystring be accessed from the list function? I've read it can
> be over the req argument. Bot how?
>
>
>
>
> ***********************************************************
>
>
>
> Alexander Gabriel
> Wiesenstrasse 22
> 8800 Thalwil
> 079/ 372 51 64
> alex@barbalex.ch
> www.barbalex.ch
>
>
>
> 2013/3/6 Alexander Gabriel <al...@barbalex.ch>
>
>> phew. What great help!
>>
>> O.k., so basically I do all I did in memory on the server inside the list
>> function. I'm not used to list functions (which is kind of obvious by no
>> I'm afraid), so I'll get my head down and work on this. But it does sound
>> as if it should work.
>>
>> Guys: You've earned a beer. Unless someone of you passes by Zürich in
>> Switzerland I'm afraid a virtual one will have to do... (and if so: do
>> contact me!)
>>
>> Thanks a lot!
>>
>>
>>
>>
>> ***********************************************************
>>
>>
>>
>> Alexander Gabriel
>> Wiesenstrasse 22
>> 8800 Thalwil
>> 079/ 372 51 64
>> alex@barbalex.ch
>> www.barbalex.ch
>>
>>
>>
>> 2013/3/6 Matthieu Rakotojaona <ma...@gmail.com>
>>
>>> On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel <al...@barbalex.ch>
>>> wrote:
>>> > Seems like this really is a Chrome issue and has nothing to do with
>>> > CouchDb.
>>>
>>> I think downloading the whole documents for each processing is a bad
>>> idea, whatever the browser. You should try to better think your views;
>>> Here are some simple thoughts on how to do it.
>>>
>>> Basically, you have a document with multiple fields. I'll take [0] as
>>> an example doc and build upon it.
>>>
>>> (I have a question first: Why do you have 3 similar structures (I'm
>>> talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user
>>> wants a document, do you consider each of those as being different, or
>>> should the 3 be merged and seen as 1 document in the output ?)
>>>
>>> The view you will need will look like this:
>>>
>>> for each doc:
>>>    for each unitary output doc:  -> if the 3 docs are counted as 3
>>> different ones
>>>       for each field in Felder:
>>>            emit(field, null)
>>>
>>> This will give you a huge list of all the fields available for each
>>> document. You will then retrieve it from the client; use a reduce
>>> function (like _count) to group the fields if they are similar.
>>>
>>> You now have a list of all possible fields on your client. You can
>>> build the filter panel with this (ie you know what fields you can
>>> filter from), and you can also prefill the export panel.
>>>
>>> Now, the user can select the fields he wants to use as a filtering.
>>> Don't send anything to the server yet ! Just build a list of all the
>>> fields you want to keep. In parallel, you can also build the list of
>>> fields you want to export in the appropriate panel.
>>>
>>> Next step is to use a _list function to retrieve the documents that
>>> have all the fields (and, if needed, transform to csv also in the
>>> _list function). This _list function would accept a filter_list and an
>>> export_list parameters, the first one being the fields a doc must have
>>> to be exported, and the second one the list of fields to be exported.
>>> You can then convert your documents and send them back to the client.
>>>
>>> [0]
>>> http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3
>>>
>>> --
>>> Matthieu RAKOTOJAONA
>>>
>>
>>
>

Re: view crashes chrome

Posted by Alexander Gabriel <al...@barbalex.ch>.
O.k., returning the list of fields works like a charm.

But how can I pass parameters to the list function?

I need to pass filter criteria that cannot be planned ahead, so filtering
in the view is no option.

Can the querystring be accessed from the list function? I've read it can be
over the req argument. Bot how?




***********************************************************



Alexander Gabriel
Wiesenstrasse 22
8800 Thalwil
079/ 372 51 64
alex@barbalex.ch
www.barbalex.ch



2013/3/6 Alexander Gabriel <al...@barbalex.ch>

> phew. What great help!
>
> O.k., so basically I do all I did in memory on the server inside the list
> function. I'm not used to list functions (which is kind of obvious by no
> I'm afraid), so I'll get my head down and work on this. But it does sound
> as if it should work.
>
> Guys: You've earned a beer. Unless someone of you passes by Zürich in
> Switzerland I'm afraid a virtual one will have to do... (and if so: do
> contact me!)
>
> Thanks a lot!
>
>
>
>
> ***********************************************************
>
>
>
> Alexander Gabriel
> Wiesenstrasse 22
> 8800 Thalwil
> 079/ 372 51 64
> alex@barbalex.ch
> www.barbalex.ch
>
>
>
> 2013/3/6 Matthieu Rakotojaona <ma...@gmail.com>
>
>> On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel <al...@barbalex.ch>
>> wrote:
>> > Seems like this really is a Chrome issue and has nothing to do with
>> > CouchDb.
>>
>> I think downloading the whole documents for each processing is a bad
>> idea, whatever the browser. You should try to better think your views;
>> Here are some simple thoughts on how to do it.
>>
>> Basically, you have a document with multiple fields. I'll take [0] as
>> an example doc and build upon it.
>>
>> (I have a question first: Why do you have 3 similar structures (I'm
>> talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user
>> wants a document, do you consider each of those as being different, or
>> should the 3 be merged and seen as 1 document in the output ?)
>>
>> The view you will need will look like this:
>>
>> for each doc:
>>    for each unitary output doc:  -> if the 3 docs are counted as 3
>> different ones
>>       for each field in Felder:
>>            emit(field, null)
>>
>> This will give you a huge list of all the fields available for each
>> document. You will then retrieve it from the client; use a reduce
>> function (like _count) to group the fields if they are similar.
>>
>> You now have a list of all possible fields on your client. You can
>> build the filter panel with this (ie you know what fields you can
>> filter from), and you can also prefill the export panel.
>>
>> Now, the user can select the fields he wants to use as a filtering.
>> Don't send anything to the server yet ! Just build a list of all the
>> fields you want to keep. In parallel, you can also build the list of
>> fields you want to export in the appropriate panel.
>>
>> Next step is to use a _list function to retrieve the documents that
>> have all the fields (and, if needed, transform to csv also in the
>> _list function). This _list function would accept a filter_list and an
>> export_list parameters, the first one being the fields a doc must have
>> to be exported, and the second one the list of fields to be exported.
>> You can then convert your documents and send them back to the client.
>>
>> [0]
>> http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3
>>
>> --
>> Matthieu RAKOTOJAONA
>>
>
>

Re: view crashes chrome

Posted by Alexander Gabriel <al...@barbalex.ch>.
phew. What great help!

O.k., so basically I do all I did in memory on the server inside the list
function. I'm not used to list functions (which is kind of obvious by no
I'm afraid), so I'll get my head down and work on this. But it does sound
as if it should work.

Guys: You've earned a beer. Unless someone of you passes by Zürich in
Switzerland I'm afraid a virtual one will have to do... (and if so: do
contact me!)

Thanks a lot!




***********************************************************



Alexander Gabriel
Wiesenstrasse 22
8800 Thalwil
079/ 372 51 64
alex@barbalex.ch
www.barbalex.ch



2013/3/6 Matthieu Rakotojaona <ma...@gmail.com>

> On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel <al...@barbalex.ch>
> wrote:
> > Seems like this really is a Chrome issue and has nothing to do with
> > CouchDb.
>
> I think downloading the whole documents for each processing is a bad
> idea, whatever the browser. You should try to better think your views;
> Here are some simple thoughts on how to do it.
>
> Basically, you have a document with multiple fields. I'll take [0] as
> an example doc and build upon it.
>
> (I have a question first: Why do you have 3 similar structures (I'm
> talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user
> wants a document, do you consider each of those as being different, or
> should the 3 be merged and seen as 1 document in the output ?)
>
> The view you will need will look like this:
>
> for each doc:
>    for each unitary output doc:  -> if the 3 docs are counted as 3
> different ones
>       for each field in Felder:
>            emit(field, null)
>
> This will give you a huge list of all the fields available for each
> document. You will then retrieve it from the client; use a reduce
> function (like _count) to group the fields if they are similar.
>
> You now have a list of all possible fields on your client. You can
> build the filter panel with this (ie you know what fields you can
> filter from), and you can also prefill the export panel.
>
> Now, the user can select the fields he wants to use as a filtering.
> Don't send anything to the server yet ! Just build a list of all the
> fields you want to keep. In parallel, you can also build the list of
> fields you want to export in the appropriate panel.
>
> Next step is to use a _list function to retrieve the documents that
> have all the fields (and, if needed, transform to csv also in the
> _list function). This _list function would accept a filter_list and an
> export_list parameters, the first one being the fields a doc must have
> to be exported, and the second one the list of fields to be exported.
> You can then convert your documents and send them back to the client.
>
> [0]
> http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3
>
> --
> Matthieu RAKOTOJAONA
>

Re: view crashes chrome

Posted by Matthieu Rakotojaona <ma...@gmail.com>.
On Tue, Mar 5, 2013 at 5:22 PM, Alexander Gabriel <al...@barbalex.ch> wrote:
> Seems like this really is a Chrome issue and has nothing to do with
> CouchDb.

I think downloading the whole documents for each processing is a bad
idea, whatever the browser. You should try to better think your views;
Here are some simple thoughts on how to do it.

Basically, you have a document with multiple fields. I'll take [0] as
an example doc and build upon it.

(I have a question first: Why do you have 3 similar structures (I'm
talking about CSCF(2009), ZH Artengruppen and ZH GIS). When the user
wants a document, do you consider each of those as being different, or
should the 3 be merged and seen as 1 document in the output ?)

The view you will need will look like this:

for each doc:
   for each unitary output doc:  -> if the 3 docs are counted as 3
different ones
      for each field in Felder:
           emit(field, null)

This will give you a huge list of all the fields available for each
document. You will then retrieve it from the client; use a reduce
function (like _count) to group the fields if they are similar.

You now have a list of all possible fields on your client. You can
build the filter panel with this (ie you know what fields you can
filter from), and you can also prefill the export panel.

Now, the user can select the fields he wants to use as a filtering.
Don't send anything to the server yet ! Just build a list of all the
fields you want to keep. In parallel, you can also build the list of
fields you want to export in the appropriate panel.

Next step is to use a _list function to retrieve the documents that
have all the fields (and, if needed, transform to csv also in the
_list function). This _list function would accept a filter_list and an
export_list parameters, the first one being the fields a doc must have
to be exported, and the second one the list of fields to be exported.
You can then convert your documents and send them back to the client.

[0] http://www.barbalex.iriscouch.com/_utils/document.html?artendb/00005A48-816B-4A30-842F-3B1A5DAAAAC3

-- 
Matthieu RAKOTOJAONA

Re: view crashes chrome

Posted by Ryan Ramage <ry...@gmail.com>.
as an off the head suggestion...you might want to look at a library that is
built for filtering large datasets in the browser.

http://square.github.com/crossfilter/




On Tue, Mar 5, 2013 at 9:40 AM, Aurélien Bénel <au...@utt.fr>wrote:

> Hi Alexander,
>
> > - the application loads all flora species with all their information as
> objects into memory (...)
> > - when the user adds a filter criterion the application loops through
> all objects and eliminates the ones not fulfilling the criterion (...)
> > - now the user can download the data (which is converted to .csv)
>
>
> If you have so much data, you should do more on the server-side using the
> power of MapReduce :
> - while the user is building its filter criteria, get from the server
> reduced data (a synthesis or an extract),
> - then, when it's done, get the CSV directly from the server (as a CouchDB
> "list").
>
>
> Regards,
>
> Aurélien

Re: view crashes chrome

Posted by Aurélien Bénel <au...@utt.fr>.
Hi Alexander,

> - the application loads all flora species with all their information as objects into memory (...)
> - when the user adds a filter criterion the application loops through all objects and eliminates the ones not fulfilling the criterion (...)
> - now the user can download the data (which is converted to .csv)


If you have so much data, you should do more on the server-side using the power of MapReduce :
- while the user is building its filter criteria, get from the server reduced data (a synthesis or an extract),
- then, when it's done, get the CSV directly from the server (as a CouchDB "list"). 


Regards,

Aurélien

Re: view crashes chrome

Posted by Alexander Gabriel <al...@barbalex.ch>.
The web-application collects information of species (flora, fauna, mosses,
mushrooms) and habitats for (Swiss) nature conservancy agencies and other
interested parties. It's main features are:
- open to any relevant information
- simple import (so hopefully kept well up to date)
- easy export
- later on: api's to access the data

When someone wants to export data:
- he chooses a group (for example "flora")
- the application loads all flora species with all their information as
objects into memory
- the application dynamically builds two forms that both contain fields for
all properties of the objects. In one, the user can set filter criteria. In
the other, the user picks which properties shall be exported
- when the user adds a filter criterion the application loops through all
objects and eliminates the ones not fulfilling the criterion
- when a user adds fields the application creates a new array, loops
through all objects, creates new empty ones in the new array and adds the
properties chosen by the user
- now the user can download the data (which is converted to .csv)

The application is in development.
A preview is here:
http://www.barbalex.iriscouch.com/artendb/_design/artendb/index.html
And here: https://github.com/barbalex/artendb (unfortunately the readme is
in German)

It's a web-app. When it loads the 64 MB JSON-Data the task-manager (I'm on
Windows 8) shows negligible load (1% CPU-usage, 65 MB memory). In other
tasks I mass upload data from the existing Access-Database. This can crash
Chrome too (well not really crash: the data-upload stops because of memory
restrictions), but only when it goes over 1.2 GB of memory usage.

Loading all the data in objects enables dynamic filtering. I don't know of
another way to do this with couchdb (views are static). That's why all the
data is loaded at once.
It's a web-app and I wouldn't know how to grab more ressources.

I think my Chrome is 32bit. Not sure if 64bit exists?

@Jens: Where would the crash be logged? I looked in the windows
"ereignisanzeige" (probably "event viewer" in english) and nothing seems to
have been noted there.
By the way: Only the register containing my web-app crashes, chrome itself
remains stable.

I tried it with IE 10 now too. Works flawlessly, as in Firefox.
Seems like this really is a Chrome issue and has nothing to do with
CouchDb. Sorry for bugging you guys! Will look for a Chrome forum.




***********************************************************



Alexander Gabriel
Wiesenstrasse 22
8800 Thalwil
079/ 372 51 64
alex@barbalex.ch
www.barbalex.ch



2013/3/5 Jens Alfke <je...@couchbase.com>

>
> On Mar 4, 2013, at 8:11 AM, Riyad Kalla <rk...@gmail.com> wrote:
>
> > Your 64mb payload of JSON sounds like it is causing the chrome process
> > to run out of memory and crash; not a CouchDB issue.
>
> That seems unlikely; I’d be more inclined to believe it if it were 600mb.
> And if the OP’s browser is 64-bit then running out of memory is a thing of
> the past, at least till your boot disk fills up.
>
> It’s usually pretty easy to tell from a crash log whether it’s an
> out-of-memory error or not.
>
> —Jens (who once worked on Chrome, a long time ago)

Re: view crashes chrome

Posted by Jens Alfke <je...@couchbase.com>.
On Mar 4, 2013, at 8:11 AM, Riyad Kalla <rk...@gmail.com> wrote:

> Your 64mb payload of JSON sounds like it is causing the chrome process
> to run out of memory and crash; not a CouchDB issue.

That seems unlikely; I’d be more inclined to believe it if it were 600mb. And if the OP’s browser is 64-bit then running out of memory is a thing of the past, at least till your boot disk fills up.

It’s usually pretty easy to tell from a crash log whether it’s an out-of-memory error or not.

—Jens (who once worked on Chrome, a long time ago)

Re: view crashes chrome

Posted by Riyad Kalla <rk...@gmail.com>.
Alex,
I think it would help a lot if you could clarify what you are trying
to do and why.

Your 64mb payload of JSON sounds like it is causing the chrome process
to run out of memory and crash; not a CouchDB issue.

Is there a specific reason you need such a huge payload of JSON at one
time inside the browser?

Folks have provided a few workarounds to limit the return if you are
just testing couch and you mentioned other browsers you tested that
don't crash from it so hopefully you aren't blocked on the tools side.

If you are writing a chrome ext/app that is crashing, you can either
figure out how to give the process more memory (assuming that is the
issue) or query the DB initially for all records without full docs in
the return, then hit couch in batches for the details OR do what
others have suggested and just get the docs in batches.

This is hard to troubleshoot because I don't know what you are
ultimately trying to do.

Best
Riyad

Sent from my iPhone

On Mar 4, 2013, at 7:38 AM, Alexander Gabriel <al...@barbalex.ch> wrote:

> using 'limit' would limit what I get, right?
> Trouble is: I need all the data.
> Am I fetching too much data? What would limit the amount of data the view
> can fetch?
>
>
>
>
> ***********************************************************
>
>
>
> Alexander Gabriel
> Wiesenstrasse 22
> 8800 Thalwil
> 079/ 372 51 64
> alex@barbalex.ch
> www.barbalex.ch
>
>
>
> 2013/3/4 Kevin R. Coombes <ke...@gmail.com>
>
>> Actually, you are probably better off use "startkey" and "limit" rather
>> than "skip".
>>
>>
>> On 3/4/2013 12:11 AM, Anthony Ananich wrote:
>>
>>> You probably need to use 'skip' and 'limit'
>>> http://wiki.apache.org/**couchdb/HTTP_view_API#**Querying_Options<http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options>
>>>
>>> On Mon, Mar 4, 2013 at 2:54 AM, Alexander Gabriel<al...@barbalex.ch>
>>> wrote:
>>>
>>>> I have this view :
>>>> function(doc) {
>>>> if (doc.Gruppe&&  doc.Gruppe === "Flora"&&  doc.Typ&&  doc.Typ ===
>>>>
>>>> "Objekt") {
>>>>  emit ([doc._id, doc._rev]);
>>>> }
>>>> }
>>>>
>>>> It fetches 7900 documents with about 65 MB.
>>>>
>>>> When I call it (from javascript) without the all_docs option, it runs
>>>> o.k.
>>>> With the all_docs option it crashes Chrome but not Firefox (both newest
>>>> versions).
>>>>
>>>> I've isolated the crash to this line of code:
>>>> $db.view('artendb/flora?**include_docs=true"});
>>>>
>>>> I'v created a view that directly fetches all docs:
>>>> function(doc) {
>>>> if (doc.Gruppe&&  doc.Gruppe === "Flora"&&  doc.Typ&&  doc.Typ ===
>>>>
>>>> "Objekt") {
>>>> emit ([doc._id, doc._rev], doc);
>>>> }
>>>> }
>>>> It runs without problems in futon.
>>>>
>>>> I've tested a bunch of the documents contained in the view on
>>>> http://jsonlint.com and they were all o.k.
>>>>
>>>> Is there a way to lint the entire 65 MB of data?
>>>> What else could cause the crash in chrome?
>>>> What would you do to crush this bug?
>>>

Re: view crashes chrome

Posted by Alexander Gabriel <al...@barbalex.ch>.
using 'limit' would limit what I get, right?
Trouble is: I need all the data.
Am I fetching too much data? What would limit the amount of data the view
can fetch?




***********************************************************



Alexander Gabriel
Wiesenstrasse 22
8800 Thalwil
079/ 372 51 64
alex@barbalex.ch
www.barbalex.ch



2013/3/4 Kevin R. Coombes <ke...@gmail.com>

> Actually, you are probably better off use "startkey" and "limit" rather
> than "skip".
>
>
> On 3/4/2013 12:11 AM, Anthony Ananich wrote:
>
>> You probably need to use 'skip' and 'limit'
>> http://wiki.apache.org/**couchdb/HTTP_view_API#**Querying_Options<http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options>
>>
>> On Mon, Mar 4, 2013 at 2:54 AM, Alexander Gabriel<al...@barbalex.ch>
>>  wrote:
>>
>>> I have this view :
>>> function(doc) {
>>> if (doc.Gruppe&&  doc.Gruppe === "Flora"&&  doc.Typ&&  doc.Typ ===
>>>
>>> "Objekt") {
>>>   emit ([doc._id, doc._rev]);
>>> }
>>> }
>>>
>>> It fetches 7900 documents with about 65 MB.
>>>
>>> When I call it (from javascript) without the all_docs option, it runs
>>> o.k.
>>> With the all_docs option it crashes Chrome but not Firefox (both newest
>>> versions).
>>>
>>> I've isolated the crash to this line of code:
>>> $db.view('artendb/flora?**include_docs=true"});
>>>
>>> I'v created a view that directly fetches all docs:
>>> function(doc) {
>>> if (doc.Gruppe&&  doc.Gruppe === "Flora"&&  doc.Typ&&  doc.Typ ===
>>>
>>> "Objekt") {
>>> emit ([doc._id, doc._rev], doc);
>>> }
>>> }
>>> It runs without problems in futon.
>>>
>>> I've tested a bunch of the documents contained in the view on
>>> http://jsonlint.com and they were all o.k.
>>>
>>> Is there a way to lint the entire 65 MB of data?
>>> What else could cause the crash in chrome?
>>> What would you do to crush this bug?
>>>
>>

Re: view crashes chrome

Posted by "Kevin R. Coombes" <ke...@gmail.com>.
Actually, you are probably better off use "startkey" and "limit" rather 
than "skip".

On 3/4/2013 12:11 AM, Anthony Ananich wrote:
> You probably need to use 'skip' and 'limit'
> http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options
>
> On Mon, Mar 4, 2013 at 2:54 AM, Alexander Gabriel<al...@barbalex.ch>  wrote:
>> I have this view :
>> function(doc) {
>> if (doc.Gruppe&&  doc.Gruppe === "Flora"&&  doc.Typ&&  doc.Typ ===
>> "Objekt") {
>>   emit ([doc._id, doc._rev]);
>> }
>> }
>>
>> It fetches 7900 documents with about 65 MB.
>>
>> When I call it (from javascript) without the all_docs option, it runs o.k.
>> With the all_docs option it crashes Chrome but not Firefox (both newest
>> versions).
>>
>> I've isolated the crash to this line of code:
>> $db.view('artendb/flora?include_docs=true"});
>>
>> I'v created a view that directly fetches all docs:
>> function(doc) {
>> if (doc.Gruppe&&  doc.Gruppe === "Flora"&&  doc.Typ&&  doc.Typ ===
>> "Objekt") {
>> emit ([doc._id, doc._rev], doc);
>> }
>> }
>> It runs without problems in futon.
>>
>> I've tested a bunch of the documents contained in the view on
>> http://jsonlint.com and they were all o.k.
>>
>> Is there a way to lint the entire 65 MB of data?
>> What else could cause the crash in chrome?
>> What would you do to crush this bug?

Re: view crashes chrome

Posted by Anthony Ananich <an...@inpun.com>.
You probably need to use 'skip' and 'limit'
http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options

On Mon, Mar 4, 2013 at 2:54 AM, Alexander Gabriel <al...@barbalex.ch> wrote:
> I have this view :
> function(doc) {
> if (doc.Gruppe && doc.Gruppe === "Flora" && doc.Typ && doc.Typ ===
> "Objekt") {
>  emit ([doc._id, doc._rev]);
> }
> }
>
> It fetches 7900 documents with about 65 MB.
>
> When I call it (from javascript) without the all_docs option, it runs o.k.
> With the all_docs option it crashes Chrome but not Firefox (both newest
> versions).
>
> I've isolated the crash to this line of code:
> $db.view('artendb/flora?include_docs=true"});
>
> I'v created a view that directly fetches all docs:
> function(doc) {
> if (doc.Gruppe && doc.Gruppe === "Flora" && doc.Typ && doc.Typ ===
> "Objekt") {
> emit ([doc._id, doc._rev], doc);
> }
> }
> It runs without problems in futon.
>
> I've tested a bunch of the documents contained in the view on
> http://jsonlint.com and they were all o.k.
>
> Is there a way to lint the entire 65 MB of data?
> What else could cause the crash in chrome?
> What would you do to crush this bug?