--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/f32f0809-9f22-49a8-92e1-d582562dce71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
what a great answer
ever got such an answer from Microsoft?
Not that we could even ask there...
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CA%2Bw3y1j%2BzUrioNf8-62D08cLuKyHWBvk-%3DqVueAfG%2BSomTh%3DJg%40mail.gmail.com.
That is somewhat disappointing news.... most of the app is built. I did design it very well... replacing pouch would cause the lowest amount of disruption possible, but I was hoping it would not come to that. And to be honest, the app has to get into production soon 😦
Thanks for the response though
Katie
You received this message because you are subscribed to a topic in the Google Groups "PouchDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pouchdb/enYAKsUPpis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CAD2UGCVAu103jE%2Bi4MCCAc%2Baf46t5pT3tEq-AEytjiFNmpwbrg%40mail.gmail.com.
I have not managed to solve this issue yet. We are just living with it for now. I sure wish it was faster 😕
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/e088dc5c-ab06-4e11-8831-d098fcfd880b%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PouchDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pouchdb/enYAKsUPpis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/21c0de70-88f6-447b-ac64-4b3ca515e744%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PouchDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pouchdb/enYAKsUPpis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/2e16d312-2f83-4ba9-a054-58fb09ec01bf%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CALFBjN9dhPYNkw9-nYNONM3a5nX52jW6RZPo0VKRidO5aeESfA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CA%2Bw3y1i6TzUoCOraAerHj6U9P_qw2-93JW3ggrY6CmQP%2BPtjKw%40mail.gmail.com.
On 07 Feb 2016, at 09:16, Katie Egervari <katie.e...@gmail.com> wrote:Hi Nolan,I finally managed to find time to get around to trying this out. I split up my database into 7 new databases. I have noticed a 257% increase in index creation performance when doing it this way. It took quite a bit of work to restructure my nearly production-ready app to make this possible, but I am super pleased with it.I have one problem - and I hope you can help me. One of these databases contains around 750MB of data all on its own. There's around 30,000 documents in there, and each document is rather non-trivial - contain lots of collections. So... I need to index it :) Unfortunately, asking PouchDB to create the index eventually causes Chrome to give the "Ah, Snap" message :(I think part of the reason this is occurring is that the call to emit() uses the second parameter. The value I am setting contains a lot of fields, but I am not providing any document property that would contain html content and otherwise large data. I just think the volume of documents is the problem. Is it trying to do it all in memory without some sort of flushing?Â
The reason I need to do this is that I want the queries using this index to not return all of the data - just some of it. With smaller databases, this makes things a lot faster and it's pretty important that this query performs well.
Any suggestions? Otherwise, everything is working great with the rest of my data. Thank you!KatieOn Wed, Jan 20, 2016 at 7:23 PM, Nolan Lawson <no...@nolanlawson.com> wrote:Hi Katie,
If each of those 150 databases were simultaneously live-syncing to a remote CouchDB, then yes, that would be a problem. Sounds like the answer is no, though, so you should be fine (the app only uses ~15 at a time?).
As for local operations: you may be able to get away with it (would depend on the browser/adapter), but TBH I've never heard of someone having so many databases (>100), so I can't say for sure how it would perform in practice. In my Pokedex app I've got ~10 databases and it runs like a champ on all browsers. You'd have to test it out to see.
BTW instead of 150 databases, another option is the relational-pouch style of overloading IDs, which would allow you to use one single database while still using only allDocs() instead of query(). There is also some advice about that here (http://pouchdb.com/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html - scroll down to "When not to use map/reduce").
Another option entirely is to use another database. For highly relational data, constantly changing data, or data that needs lots of secondary indexes, a database closer to the metal like Dexie (with IndexedDB shim for Safari) would probably be best. However, if you can overload IDs or use many separate databases, then you can stick with PouchDB and have much better performance.
Hope that helps!
Cheers,
Nolan--
You received this message because you are subscribed to a topic in the Google Groups "PouchDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pouchdb/enYAKsUPpis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/2e16d312-2f83-4ba9-a054-58fb09ec01bf%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CALFBjN9dhPYNkw9-nYNONM3a5nX52jW6RZPo0VKRidO5aeESfA%40mail.gmail.com.
mapFunction: function(document) {
function emitLowerCaseSubStrings(text, observation) {
if(text) {
var words = text.toLowerCase()
.replace(/[/;:\-]/g, ' ')
.replace(/[.,#!$%\^&\*\[\]{}=_`~()]/g, '')
.replace(/\s{2,}/g, ' ')
.trim()
.match(/(\S+)*/g);
for(var i = 0; i < words.length; i++) {
if(words[i].length > 0) {
emit(words[i], observation);
}
}
}
}
if(document.documentType === 'attribute' &&
document.options &&
(document.category.keyCode === 'SYMPTOM' ||
document.category.keyCode === 'UNSPECIFIED')
) {
for(var i = 0; i < document.options.length; i++) {
if(document.options[i].name && !document.options[i].normal) {
var observation = {
option: document.options[i]
};
emitLowerCaseSubStrings(document.name, observation);
emitLowerCaseSubStrings(document.searchFriendlyName, observation);
emitLowerCaseSubStrings(document.options[i].name, observation);
emitLowerCaseSubStrings(document.options[i].searchFriendlyName, observation);
}
}
}
}
mapFunction: function(document) {
if(document.documentType === 'solution') {
for(var i = 0; i < document.orGroups.length; i++) {
for(var j = 0; j < document.orGroups[i].observations.length; j++) {
emit(document.orGroups[i].observations[j].attribute.id);
}
}
}
}
--
You received this message because you are subscribed to a topic in the Google Groups "PouchDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pouchdb/enYAKsUPpis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/282579d8-6075-4213-8b47-3ed2213298b8%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PouchDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pouchdb/enYAKsUPpis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/e8fa1555-b5bc-4bba-821f-6ac410610a96%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CALFBjN-9JE%2BK-jwvfW28J2ZR%3DzVYBt4uD19L4fsDe0P60bFYfw%40mail.gmail.com.
Katie - precomputing on the server sounds like a great idea, especially if the data is mostly static. Also I'll reiterate that, for such a large secondary index, you'll almost certainly get better perf from LocalForage, Dexie, or YDN-DB. Agreed that in-memory doesn't seem like an option here.
Alexander: ultimately the solution will be native secondary indexes, which I've already started poking around on, although I can't promise anything anytime soon. Basically it will create secondary indexes in the host PouchDB database rather than constructing a second PouchDB database, which should give performance closer to what LocalForage, Dexie, or YDN offers.
--
You received this message because you are subscribed to a topic in the Google Groups "PouchDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pouchdb/enYAKsUPpis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/9cf2fdc1-3d24-413e-ac7e-753f40d9a9e1%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/CALFBjN93Ci4XHrzEfnodWnWCmN6PT%2Bj19%3Dm-5aOUV9a-T2y7xQ%40mail.gmail.com.
No, it's not possible. You currently can't sync views from CouchDB.
--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/f1f104ef-02bf-444a-8a07-32ee543d8308%40googlegroups.com.