Pouchdb listeners issue with angularjs and couchbase

I am using pouchdb with couchbase and angularjs.

I have a service which has different pouchdb functions like save(), getAllDocs(), delete() etc. Also, have defined a listener for pouchdb to start listening for changes.

I have different controllers defined, and in every controller I start to listen for changes and when user leaves the view stops listening for changes. These listeners are started only after user’s login.

So, when the user login to the webapp, pouchdb starts listening for changes on every controller.

However, as the data grows the latency for displaying the data also increases.

So, could someone help me on improving this performance issue.


Can you post a succinct version of the code that you’re using to demonstrate the issue?

This sounds like a PouchDB issue … or have you identified that the latency is there at the time the data reaches the process?